From 31ab0b99792f0d6238d47fda91e1b36c03b86dee Mon Sep 17 00:00:00 2001 From: Tierney Cyren Date: Thu, 20 Feb 2025 12:49:31 -0500 Subject: [PATCH 1/2] test: update test command to be test and coverage Signed-off-by: Tierney Cyren --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index edddc4e..240d354 100644 --- a/package.json +++ b/package.json @@ -59,9 +59,9 @@ "biome:format:write": "npx @biomejs/biome format --write .", "biome:lint": "npx @biomejs/biome lint .", "biome:lint:write": "npx @biomejs/biome lint --write .", + "coverage": "nyc --check-coverage --lines 90 --reporter=html --reporter=text mocha --forbid-only \"test/**/*.test.js\"", "postpack": "rm -f oclif.manifest.json", - "posttest": "eslint --ignore-path .gitignore . && npm audit", "prepack": "oclif-dev manifest && oclif-dev readme", - "test": "nyc --check-coverage --lines 90 --reporter=html --reporter=text mocha --forbid-only \"test/**/*.test.js\"" + "test": "mocha --forbid-only \"test/**/*.test.js\"" } } From 1a818952ebabff55890ab154c0de953413391d3c Mon Sep 17 00:00:00 2001 From: Tierney Cyren Date: Thu, 20 Feb 2025 12:49:44 -0500 Subject: [PATCH 2/2] ci: add test and coverage GitHub Actions Signed-off-by: Tierney Cyren --- .github/workflows/coverage.yml | 24 ++++++++++++++++++++++++ .github/workflows/test.yml | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/coverage.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..2613c8f --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,24 @@ +name: "Test Suite: Linter" + +on: + push: + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + coverage: + if: github.repository == 'twilio-labs/plugin-token' + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v4 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: current + - name: Run npm install + run: npm install + - name: Run npm run coverage + run: npm run coverage \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..93e8c0b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,24 @@ +name: "Test Suite: Linter" + +on: + push: + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + test: + if: github.repository == 'twilio-labs/plugin-token' + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v4 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: current + - name: Run npm install + run: npm install + - name: Run npm run test + run: npm run test \ No newline at end of file