From 81bf08236531829575d5848e83074b10cfef32c3 Mon Sep 17 00:00:00 2001 From: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com> Date: Fri, 7 Feb 2025 12:21:59 +0100 Subject: [PATCH 1/2] workflow: introduce ci --- .github/workflows/ci.yml | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e82d259 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + +name: Tests + +on: + push: + branches: [ "main" ] + pull_request: + # we use devlop branch for now before publishing the website + branches: [ "main", "develop" ] + +jobs: + quality: + runs-on: ubuntu-latest + steps: + - name: Harden Runner + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 + with: + egress-policy: audit + + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + with: + node-version-file: '.nvmrc' + - name: Setup Biome + uses: biomejs/setup-biome@c016c38f26f2c4a6eb3662679143614a254263fd # v2.3.0 + with: + version: latest + - name: Run Biome + run: biome ci . + - name: Check types + run: node --run types:check + + test: + runs-on: ubuntu-latest + needs: quality + # node --run test:unit + steps: + - name: Harden Runner + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 + with: + egress-policy: audit + + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + with: + node-version-file: '.nvmrc' + - name: Run Tests + run: node --run test:unit From a4a3151f4a8cd448b41879eeb7889e19737ba985 Mon Sep 17 00:00:00 2001 From: Augustin Mauroy Date: Fri, 7 Feb 2025 12:24:18 +0100 Subject: [PATCH 2/2] remove useless comment --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e82d259..586d10b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,6 @@ jobs: test: runs-on: ubuntu-latest needs: quality - # node --run test:unit steps: - name: Harden Runner uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4