From c48a07510db539a1682f3f7aaa4db00d9ae49a27 Mon Sep 17 00:00:00 2001 From: Giamir Buoncristiani Date: Thu, 12 Oct 2023 14:45:37 +0200 Subject: [PATCH] ci(init): add dependabot and basic ci workflow --- .github/dependabot.yml | 7 +++++++ .github/workflows/CI.yml | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/CI.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..f736042 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + versioning-strategy: increase \ No newline at end of file diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..00ec805 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,37 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build-and-test: + name: Build and Test + runs-on: ubuntu-latest + steps: + - name: ⬇️ Checkout + uses: actions/checkout@v3 + + - name: ⎔ Setup node + uses: actions/setup-node@v3 + with: + node-version: 'lts/*' + + - name: 🏗 Install and Build + run: | + npm ci + npx playwright install --with-deps + npm run build + + - name: ▶️ Linting + run: npm run lint + + - name: ▶️ Testing + run: npm run test + +# cancel the jobs if another workflow is kicked off for the same branch +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true \ No newline at end of file