-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ethan Jaffee
committed
Jan 24, 2024
1 parent
6131eb5
commit 3d3aa64
Showing
1 changed file
with
6 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,12 @@ | ||
# This workflow will do a clean install of node dependencies, build the source code, | ||
# and run tests across different versions of node. | ||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: Run Tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
working-directory: ${{ inputs.working_directory }} | ||
|
||
strategy: | ||
matrix: | ||
node-version: ${{ fromJSON(inputs.node_matrix) }} | ||
|
||
inputs: | ||
build_script: | ||
required: false | ||
type: string | ||
default: npm run build | ||
test_script: | ||
required: false | ||
type: string | ||
default: npm test | ||
working_directory: | ||
required: false | ||
type: string | ||
default: . | ||
node_matrix: | ||
required: false | ||
type: string | ||
default: '["14.x"]' | ||
|
||
secrets: | ||
NPM_TOKEN: | ||
required: false | ||
MAPBOX_API_KEY: | ||
required: false | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
call_run_tests: | ||
uses: yext/slapshot-reusable-workflows/.github/workflows/run_tests.yml@v1 | ||
with: | ||
test_script: npx jest |