From a3327b163cb36a23a4fdb790320dd14526f04d40 Mon Sep 17 00:00:00 2001 From: chris Date: Sat, 16 Sep 2023 19:09:28 -0700 Subject: [PATCH 1/2] reduce workflows loc --- .github/workflows/coverage.yml | 10 +++------- .github/workflows/{npm-publish.yml => publish.yml} | 14 -------------- 2 files changed, 3 insertions(+), 21 deletions(-) rename .github/workflows/{npm-publish.yml => publish.yml} (77%) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index db899ccd..b71535b7 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -8,25 +8,21 @@ on: jobs: build: - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest timeout-minutes: 12 - strategy: - matrix: - node-version: [20.x] - os: [ubuntu-latest] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node-version }} + node-version: 20 # - run: npm install -g npm@latest - run: npm install - run: npm run build --if-present - run: | { PER=$(npm run test-cover | tee /dev/fd/3 | grep -oP "All\ files[^\d]*(\d\d?\.?\d?\d?)" | grep -oP "(\d\d?\.?\d?\d?)$"); } 3>&1 echo "COVERAGE=$PER%" >> $GITHUB_ENV - # var REF = 'refs/pull/27/merge.json'; + # var REF = 'refs/pull/27/merge.json'; REF=${{ github.ref }} # console.log('github.ref: ' + REF); echo "github.ref: $REF" diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/publish.yml similarity index 77% rename from .github/workflows/npm-publish.yml rename to .github/workflows/publish.yml index 2157b7f6..5ee15490 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/publish.yml @@ -16,20 +16,6 @@ jobs: - run: npm run build --if-present - run: npm run test-ci -# publish-npm: -# needs: build -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v2 -# - uses: actions/setup-node@v2 -# with: -# node-version: 16 -# registry-url: https://registry.npmjs.org/ -# - run: npm install -# - run: npm publish -# env: -# NODE_AUTH_TOKEN: ${{secrets.npm_token}} - publish-gpr: needs: build runs-on: ubuntu-latest From 03349a80ce53537cfec2bf15ca385015908dc02e Mon Sep 17 00:00:00 2001 From: chris Date: Sat, 16 Sep 2023 19:10:37 -0700 Subject: [PATCH 2/2] remove un-needed strict from README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4bea3095..b8e865cf 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ await esmock( `esmock` examples ``` javascript import test from 'node:test' -import assert from 'node:assert/strict' +import assert from 'node:assert' import esmock from 'esmock' test('package, alias and local file mocks', async () => {