From 4e920884aecf01751c14888b83ef71f955d9fb7f Mon Sep 17 00:00:00 2001 From: Jan W Date: Tue, 9 Jul 2024 11:27:06 +0200 Subject: [PATCH 1/4] ci: run checks --- .github/workflows/checks.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/checks.yaml diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml new file mode 100644 index 0000000..92b1384 --- /dev/null +++ b/.github/workflows/checks.yaml @@ -0,0 +1,32 @@ +name: Checks + +on: + push: + branches: ['main'] + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: true + +jobs: + check: + runs-on: ubuntu-latest + name: ${{ matrix.name }} + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + include: + - name: Lint + cmd: pnpm lint + - name: Test + cmd: pnpm test + steps: + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 + - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b + with: + node-version-file: .nvmrc + cache: pnpm + - run: pnpm i --frozen-lockfile + - run: ${{ matrix.cmd }} From 296db31aecf6fb2217a10d9cda395ac283bbdeb5 Mon Sep 17 00:00:00 2001 From: Jan W Date: Tue, 9 Jul 2024 11:29:01 +0200 Subject: [PATCH 2/4] ci: use pnpm setup action --- .github/workflows/checks.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 92b1384..b40b5c8 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -28,5 +28,6 @@ jobs: with: node-version-file: .nvmrc cache: pnpm + - uses: pnpm/action-setup@18ac635edf3d6cd3e88d281bceecc25c4dbc1e73 - run: pnpm i --frozen-lockfile - run: ${{ matrix.cmd }} From cfb59d9623ab3e645d2fd29c24307c60a1658c92 Mon Sep 17 00:00:00 2001 From: Jan W Date: Tue, 9 Jul 2024 11:31:01 +0200 Subject: [PATCH 3/4] ci: setup pnpm before node --- .github/workflows/checks.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index b40b5c8..a55e056 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -24,10 +24,12 @@ jobs: cmd: pnpm test steps: - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 + - uses: pnpm/action-setup@18ac635edf3d6cd3e88d281bceecc25c4dbc1e73 + with: + run_install: false - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b with: node-version-file: .nvmrc cache: pnpm - - uses: pnpm/action-setup@18ac635edf3d6cd3e88d281bceecc25c4dbc1e73 - run: pnpm i --frozen-lockfile - run: ${{ matrix.cmd }} From a5e2d05ef7b6aedd4c6a4b1f1ef4d62759520693 Mon Sep 17 00:00:00 2001 From: Jan W Date: Tue, 9 Jul 2024 11:53:37 +0200 Subject: [PATCH 4/4] ci: set NODE_AUTH_TOKEN --- .github/workflows/checks.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index a55e056..269be0d 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -31,5 +31,8 @@ jobs: with: node-version-file: .nvmrc cache: pnpm + registry-url: 'https://registry.npmjs.org' - run: pnpm i --frozen-lockfile + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: ${{ matrix.cmd }}