From ab6e20ebb82de7f2a79cde0bb547d8fb3a06bac2 Mon Sep 17 00:00:00 2001 From: Dominik Dewitz Date: Wed, 5 Jun 2024 15:27:56 +0200 Subject: [PATCH] feat: :construction_worker: add pull request ci action --- .github/dependabot.yml | 11 ++++++++++ .github/workflows/build-and-test.yml | 33 ++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/build-and-test.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..13fbd7f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: 'npm' # See documentation for possible values + directory: '/' # Location of package manifests + schedule: + interval: 'weekly' diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..5be241a --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,33 @@ +name: Build and Test + +on: + pull_request: + branches: [main] + workflow_dispatch: + +jobs: + build_and_test: + runs-on: ubuntu-latest + steps: + - name: Checkout project + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + + - name: Install Node v20 + uses: actions/setup-node@v3 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org/' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Lint + run: npm run lint + + - name: Run tests + run: npm run test