feat: added test script substitution
This commit is contained in:
parent
86c23b7d53
commit
d1564129b6
2 changed files with 13 additions and 6 deletions
6
.github/workflows/lint.yaml
vendored
6
.github/workflows/lint.yaml
vendored
|
|
@ -14,6 +14,10 @@ on:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: yarn run setup
|
default: yarn run setup
|
||||||
|
TEST_SCRIPT:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: yarn run test --ci --passWithNoTests --coverage
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linting_type_checking:
|
linting_type_checking:
|
||||||
|
|
@ -53,7 +57,7 @@ jobs:
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
if: ${{ inputs.TESTS_ENABLED == true }}
|
if: ${{ inputs.TESTS_ENABLED == true }}
|
||||||
run: |
|
run: |
|
||||||
yarn run test --ci --passWithNoTests --coverage
|
${{ inputs.TEST_SCRIPT }}
|
||||||
|
|
||||||
- name: Static code analysis with SonarQube
|
- name: Static code analysis with SonarQube
|
||||||
uses: https://github.com/SonarSource/sonarqube-scan-action@v5
|
uses: https://github.com/SonarSource/sonarqube-scan-action@v5
|
||||||
|
|
|
||||||
13
README.md
13
README.md
|
|
@ -76,11 +76,14 @@ Linting, type checking, sonarqube, dependency tracking, any testing
|
||||||
|
|
||||||
##### Inputs
|
##### Inputs
|
||||||
|
|
||||||
| Key | Description | Required |
|
| Key | Description | Required |
|
||||||
| ------------------- | ----------------------------------------------------------------------------------- | -------- |
|
| ------------------- | ---------------------------------------------------------------------------------- | -------- |
|
||||||
| `SONARQUBE_ENABLED` | Send source to sonarqube for code analysis; default: `false` | |
|
| `SONARQUBE_ENABLED` | Send source to sonarqube for code analysis; default: `false` | |
|
||||||
| `TESTS_ENABLED` | Enable test suites; default: `false` | |
|
| `TESTS_ENABLED` | Enable test suites; default: `false` | |
|
||||||
| `SETUP_REPO_SCRIPT` | Script which runs after install for setting up the repo; default: `yarn run setup`) | |
|
| `SETUP_REPO_SCRIPT` | Script which runs after install for setting up the repo; default: `yarn run setup` | |
|
||||||
|
| `TEST_SCRIPT` | Script which runs when tests are enabled; default: `yarn run test:coverage:lcov` | |
|
||||||
|
|
||||||
|
TEST_SCRIPT
|
||||||
|
|
||||||
##### Secrets
|
##### Secrets
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue