Skip to content

Commit

Permalink
Merge pull request #7 from cncsc/feature/XDR-5434-alternative
Browse files Browse the repository at this point in the history
XDR-5434: Add test runner in validation job
  • Loading branch information
GerardSetho authored Jan 17, 2024
2 parents 287c3d9 + 40f2473 commit 56e4352
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
required: false
type: boolean
default: true
runDefaultTests:
description: Whether or not to run the test script from the project's package.json file.
required: false
type: boolean
default: false
additionalHomebrewPackages:
description: A space-delimited list of Homebrew packages to install.
required: false
Expand Down Expand Up @@ -94,3 +99,28 @@ jobs:
- name: Run lint script
run: npm run lint
shell: bash

# -------------------------------------------------------------------------------------------------------------------
# RUN DEFAULT TEST SUITES
# -------------------------------------------------------------------------------------------------------------------
test:
name: Run default test suites
runs-on: ubuntu-latest
if: inputs.runDefaultTests == true
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.GIT_TOKEN_BASIC || github.token }}

- uses: actions/setup-node@v3
with:
node-version: lts/*

- name: Install node dependencies
run: npm ci
shell: bash

- name: Run test script
run: npm run test
shell: bash
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
runPreCommit: true # optional
runDefaultLinters: true # optional
additionalHomebrewPackages: tflint tfsec # optional
runDefaultTests: true # optional
```
### Semantic Release Workflow
Expand Down

0 comments on commit 56e4352

Please sign in to comment.