-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
1 changed file
with
42 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Build and test Node.js | ||
|
||
on: [] | ||
|
||
jobs: | ||
matrix: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- id: matrix | ||
uses: nasa-gcn/node-auto-matrix@main | ||
outputs: | ||
nodeVersion: ${{ steps.matrix.outputs.nodeVersion }} | ||
runsOn: ${{ steps.matrix.outputs.runsOn }} | ||
build: | ||
needs: matrix | ||
strategy: | ||
matrix: | ||
nodeVersion: ${{ fromJson(needs.matrix.outputs.nodeVersion) }} | ||
runsOn: ${{ fromJson(needs.matrix.outputs.runsOn) }} | ||
runs-on: ${{ matrix.runsOn }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.nodeVersion }} | ||
- name: NPM Install | ||
run: npm ci | ||
- name: Run eslint linter | ||
run: npx eslint --max-warnings 0 . | ||
- name: Run TypeScript compiler | ||
run: npm run typecheck | ||
- name: Run Prettier code style checks | ||
run: npx prettier -c . | ||
# Skip prettier checks on Windows due to line endings. | ||
# See https://prettier.io/docs/en/options.html#end-of-line | ||
if: ${{ runner.os != 'Windows' }} | ||
- name: Run unit tests | ||
run: npm run test-coverage | ||
- name: Upload to Codecov.io | ||
uses: codecov/codecov-action@v3 |