chore: update test script and the corresponding pipelines (#1593)

* chore: update test script and the corresponding pipelines

* update the coverage threshold
This commit is contained in:
Andrew Tatomyr
2024-06-21 14:39:57 +03:00
committed by GitHub
parent 9456460f77
commit 2bfef43b8a
6 changed files with 8 additions and 23 deletions

View File

@@ -4,7 +4,7 @@ on:
types: [labeled]
jobs:
test-and-deploy-s3-sandbox:
deploy-s3-sandbox:
if: ${{ github.event.label.name == 'deploy_s3_sandbox' }}
runs-on: ubuntu-latest
steps:
@@ -22,8 +22,6 @@ jobs:
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
- name: Bundle into single file
run: npm run webpack-bundle

View File

@@ -64,7 +64,7 @@ jobs:
- name: Run Benchmark
run: |
cd benchmark/
npm test
npm run unit
cat benchmark_check.md
env:
CI: true

View File

@@ -23,7 +23,7 @@ jobs:
- name: Typecheck
run: npm run typecheck
- name: Unit Tests
run: npm run jest -- --silent --ci --testLocationInResults --bail --coverage
run: npm run unit
- name: E2E Tests
run: npm run e2e
env:
@@ -66,21 +66,7 @@ jobs:
annotations: none
test-script: npm run jest
prettier-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
env:
CI: true
- run: npm run prettier:check
eslint:
code-style-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@@ -93,3 +79,4 @@ jobs:
env:
CI: true
- run: npm run eslint
- run: npm run prettier:check

View File

@@ -161,7 +161,7 @@ Having `redocly.yaml` in the root of the project affects the unit tests, and con
### Unit tests
Run unit tests with this command: `npm run test`.
Run unit tests with this command: `npm run unit`.
Unit tests in the **cli** package are sensitive to top-level configuration file (**redocly.yaml**).

View File

@@ -19,7 +19,7 @@ module.exports = {
},
'packages/cli/': {
statements: 60,
branches: 50,
branches: 52,
functions: 60,
lines: 60,
},

View File

@@ -9,7 +9,7 @@
},
"engineStrict": true,
"scripts": {
"test": "npm run typecheck && npm run unit",
"test": "npm run typecheck && npm run compile && npm run unit && npm run e2e",
"jest": "REDOCLY_TELEMETRY=off jest ./packages",
"unit": "npm run jest -- --coverage --coverageReporters lcov text-summary",
"unit:watch": "REDOCLY_TELEMETRY=off jest --watch",