generated from actions/javascript-action
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from byu-oit/node20
Use Node.js v20, bump dependencies, refer to Tyk, improve CI
- Loading branch information
Showing
7 changed files
with
1,980 additions
and
3,431 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,75 +1,90 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- staging | ||
- 'v*' | ||
env: | ||
node_version: "16.x" | ||
node_version: "20.x" | ||
FORCE_COLOR: 3 | ||
|
||
jobs: | ||
build: # make sure build/ci work properly | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
|
||
- name: npm install | ||
run: npm install | ||
- name: npm ci | ||
run: npm ci --prefer-offline | ||
|
||
- name: npm run pack | ||
- name: npm run package | ||
run: npm run package | ||
|
||
- name: Check for any changed files | ||
run: | | ||
[[ -z $(git status --untracked-files=no --porcelain) ]] || \ | ||
(echo "::error title=npm run package::Files in the /dist directory shouldn't have changed. You forgot to run 'npm run package'." && exit 1) | ||
audit: | ||
name: Audit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
|
||
# We don't need to install deps to audit them | ||
|
||
- name: npm audit | ||
run: npm audit --audit-level=critical | ||
|
||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
cache: npm | ||
cache-dependency-path: '**/package-lock.json' | ||
|
||
- name: npm install | ||
run: npm install | ||
- name: npm ci | ||
run: npm ci --prefer-offline | ||
|
||
- name: npm lint | ||
run: npm run lint | ||
|
||
# When tests are added to the code uncomment | ||
# test-code: | ||
# test: | ||
# name: Test | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - uses: actions/checkout@v4 | ||
# | ||
# - name: Set up Node.js | ||
# uses: actions/setup-node@v3 | ||
# uses: actions/setup-node@v4 | ||
# with: | ||
# node-version: ${{ env.node_version }} | ||
# cache: npm | ||
# cache-dependency-path: '**/package-lock.json' | ||
# | ||
# - name: npm install | ||
# run: npm install | ||
# - name: npm ci | ||
# run: npm ci --prefer-offline | ||
# | ||
# - name: npm test | ||
# run: npm test | ||
# | ||
# - name: Report test coverage to Codecov | ||
# uses: codecov/codecov-action@v3 |
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
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.