From 91223b3b1e4e79a024e3a3a8f322355c331732ed Mon Sep 17 00:00:00 2001 From: Bart Veneman Date: Wed, 1 May 2024 17:16:49 +0200 Subject: [PATCH 1/6] Run publint in Github Actions closes #51 Runs publint during the `test` job. Also merges the lint job into the test job. --- .github/workflows/test.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eb1e751..9135653 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,14 +10,6 @@ on: branches: [main] jobs: - lint: - name: Lint JS - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Lint JS - run: npx --yes oxlint@latest -D perf test: name: Unit tests runs-on: ubuntu-latest @@ -30,7 +22,11 @@ jobs: cache: "npm" - name: Install dependencies run: npm install --ignore-scripts --no-audit - - name: Run unit tests + - name: Unit tests run: npm test - - name: Test types + - name: Check types run: npm run check + - name: Lint JS + run: npx --yes oxlint@latest -D perf + - name: "Publint" + run: "npx --yes publint" From 9bff5502dc72501b04e8a3de501e554df4da4830 Mon Sep 17 00:00:00 2001 From: Bart Veneman Date: Wed, 1 May 2024 17:19:11 +0200 Subject: [PATCH 2/6] Build package before publint --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9135653..caa3599 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,5 +28,7 @@ jobs: run: npm run check - name: Lint JS run: npx --yes oxlint@latest -D perf + - name: Build package + run: npm run build - name: "Publint" run: "npx --yes publint" From 541b733c1aa1698e45164996ce7e42fdd5f558a2 Mon Sep 17 00:00:00 2001 From: Bart Veneman Date: Sun, 5 May 2024 09:15:01 +0200 Subject: [PATCH 3/6] run all CI in separate jobs --- .github/workflows/test.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index caa3599..a94fa8b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,11 +24,39 @@ jobs: run: npm install --ignore-scripts --no-audit - name: Unit tests run: npm test + check: + name: Check types + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "npm" + - name: Install dependencies + run: npm install --ignore-scripts --no-audit - name: Check types run: npm run check + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "npm" + - name: Install dependencies + run: npm install --ignore-scripts --no-audit - name: Lint JS run: npx --yes oxlint@latest -D perf + lint-package: + name: Lint package + runs-on: ubuntu-latest + steps: - name: Build package run: npm run build - - name: "Publint" + - name: Run "Publint" run: "npx --yes publint" From 6cba2eee159f81e314fd4023a30d1be8e8ba7532 Mon Sep 17 00:00:00 2001 From: Bart Veneman Date: Sun, 5 May 2024 09:16:33 +0200 Subject: [PATCH 4/6] fix --- .github/workflows/test.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a94fa8b..5bfcd44 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -56,6 +56,15 @@ jobs: name: Lint package runs-on: ubuntu-latest steps: + steps: + - uses: actions/checkout@v4 + - name: Use Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "npm" + - name: Install dependencies + run: npm install --ignore-scripts --no-audit - name: Build package run: npm run build - name: Run "Publint" From f41e2074e3125de8f594b93f790cae312850fed9 Mon Sep 17 00:00:00 2001 From: Bart Veneman Date: Sun, 5 May 2024 09:18:03 +0200 Subject: [PATCH 5/6] fix --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5bfcd44..d7ce5f4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,7 +55,6 @@ jobs: lint-package: name: Lint package runs-on: ubuntu-latest - steps: steps: - uses: actions/checkout@v4 - name: Use Node.js 20 From bcf27ab679614d3daf99a96f6be058db54f3536a Mon Sep 17 00:00:00 2001 From: Bart Veneman Date: Sun, 5 May 2024 09:20:28 +0200 Subject: [PATCH 6/6] run all in 1 job --- .github/workflows/test.yml | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d7ce5f4..caa3599 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,47 +24,11 @@ jobs: run: npm install --ignore-scripts --no-audit - name: Unit tests run: npm test - check: - name: Check types - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Use Node.js 20 - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: "npm" - - name: Install dependencies - run: npm install --ignore-scripts --no-audit - name: Check types run: npm run check - lint: - name: Lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Use Node.js 20 - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: "npm" - - name: Install dependencies - run: npm install --ignore-scripts --no-audit - name: Lint JS run: npx --yes oxlint@latest -D perf - lint-package: - name: Lint package - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Use Node.js 20 - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: "npm" - - name: Install dependencies - run: npm install --ignore-scripts --no-audit - name: Build package run: npm run build - - name: Run "Publint" + - name: "Publint" run: "npx --yes publint"