mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-09 12:47:48 +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]
|
types: [labeled]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-and-deploy-s3-sandbox:
|
deploy-s3-sandbox:
|
||||||
if: ${{ github.event.label.name == 'deploy_s3_sandbox' }}
|
if: ${{ github.event.label.name == 'deploy_s3_sandbox' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -22,8 +22,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: Run tests
|
|
||||||
run: npm test
|
|
||||||
|
|
||||||
- name: Bundle into single file
|
- name: Bundle into single file
|
||||||
run: npm run webpack-bundle
|
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
|
- name: Run Benchmark
|
||||||
run: |
|
run: |
|
||||||
cd benchmark/
|
cd benchmark/
|
||||||
npm test
|
npm run unit
|
||||||
cat benchmark_check.md
|
cat benchmark_check.md
|
||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
|
|||||||
19
.github/workflows/tests.yaml
vendored
19
.github/workflows/tests.yaml
vendored
@@ -23,7 +23,7 @@ jobs:
|
|||||||
- name: Typecheck
|
- name: Typecheck
|
||||||
run: npm run typecheck
|
run: npm run typecheck
|
||||||
- name: Unit Tests
|
- name: Unit Tests
|
||||||
run: npm run jest -- --silent --ci --testLocationInResults --bail --coverage
|
run: npm run unit
|
||||||
- name: E2E Tests
|
- name: E2E Tests
|
||||||
run: npm run e2e
|
run: npm run e2e
|
||||||
env:
|
env:
|
||||||
@@ -66,21 +66,7 @@ jobs:
|
|||||||
annotations: none
|
annotations: none
|
||||||
test-script: npm run jest
|
test-script: npm run jest
|
||||||
|
|
||||||
prettier-check:
|
code-style-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:
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@@ -93,3 +79,4 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
- run: npm run eslint
|
- 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
|
### 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**).
|
Unit tests in the **cli** package are sensitive to top-level configuration file (**redocly.yaml**).
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
'packages/cli/': {
|
'packages/cli/': {
|
||||||
statements: 60,
|
statements: 60,
|
||||||
branches: 50,
|
branches: 52,
|
||||||
functions: 60,
|
functions: 60,
|
||||||
lines: 60,
|
lines: 60,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
},
|
},
|
||||||
"engineStrict": true,
|
"engineStrict": true,
|
||||||
"scripts": {
|
"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",
|
"jest": "REDOCLY_TELEMETRY=off jest ./packages",
|
||||||
"unit": "npm run jest -- --coverage --coverageReporters lcov text-summary",
|
"unit": "npm run jest -- --coverage --coverageReporters lcov text-summary",
|
||||||
"unit:watch": "REDOCLY_TELEMETRY=off jest --watch",
|
"unit:watch": "REDOCLY_TELEMETRY=off jest --watch",
|
||||||
|
|||||||
Reference in New Issue
Block a user