mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-06 04:21:09 +00:00
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:
4
.github/workflows/deploy-s3-sandbox.yaml
vendored
4
.github/workflows/deploy-s3-sandbox.yaml
vendored
@@ -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
|
||||
|
||||
2
.github/workflows/performance.yaml
vendored
2
.github/workflows/performance.yaml
vendored
@@ -64,7 +64,7 @@ jobs:
|
||||
- name: Run Benchmark
|
||||
run: |
|
||||
cd benchmark/
|
||||
npm test
|
||||
npm run unit
|
||||
cat benchmark_check.md
|
||||
env:
|
||||
CI: true
|
||||
|
||||
19
.github/workflows/tests.yaml
vendored
19
.github/workflows/tests.yaml
vendored
@@ -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
|
||||
|
||||
@@ -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**).
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ module.exports = {
|
||||
},
|
||||
'packages/cli/': {
|
||||
statements: 60,
|
||||
branches: 50,
|
||||
branches: 52,
|
||||
functions: 60,
|
||||
lines: 60,
|
||||
},
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user