Skip to content

Commit

Permalink
Merge pull request #925 from 18F/audit-signatures-workflow
Browse files Browse the repository at this point in the history
Add 'npm audit signatures' to CI workflow.
  • Loading branch information
levinmr authored Nov 18, 2024
2 parents 6b754de + 5faf2de commit 4f901ea
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,30 @@ jobs:
- name: Install node
uses: actions/setup-node@v4
with:
node-version: "lts/*"
node-version-file: ".nvmrc"
cache: 'npm'
- name: Install node dependencies
run: npm ci
- name: Lint javascript
run: npm run lint
audit_dependencies:
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: 'npm'
- name: Install node dependencies
run: npm ci
- name: Validate npm package signatures
run: npm audit signatures
test:
needs: lint
needs:
- lint
- audit_dependencies
runs-on: ubuntu-latest
# Start Postgres as a service, wait until healthy. Uses latest Postgres version.
services:
Expand All @@ -43,7 +59,7 @@ jobs:
- name: Install node
uses: actions/setup-node@v4
with:
node-version: "lts/*"
node-version-file: ".nvmrc"
cache: 'npm'
- name: Install node dependencies
run: npm ci
Expand All @@ -52,6 +68,7 @@ jobs:
deploy_dev:
needs:
- lint
- audit_dependencies
- test
if: github.ref == 'refs/heads/develop'
uses: 18F/analytics-reporter/.github/workflows/deploy.yml@develop
Expand Down Expand Up @@ -81,6 +98,7 @@ jobs:
deploy_stg:
needs:
- lint
- audit_dependencies
- test
if: github.ref == 'refs/heads/staging'
uses: 18F/analytics-reporter/.github/workflows/deploy.yml@develop
Expand Down Expand Up @@ -110,6 +128,7 @@ jobs:
deploy_prd:
needs:
- lint
- audit_dependencies
- test
if: github.ref == 'refs/heads/master'
uses: 18F/analytics-reporter/.github/workflows/deploy.yml@develop
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
- name: Install node
uses: actions/setup-node@v4
with:
node-version: "lts/*"
node-version-file: ".nvmrc"
cache: 'npm'
- name: Install node dependencies
# This causes npm install to omit dev dependencies per NPM docs.
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
- name: Install node
uses: actions/setup-node@v4
with:
node-version: "lts/*"
node-version-file: ".nvmrc"
cache: 'npm'
- name: Install node dependencies
# This causes npm install to omit dev dependencies per NPM docs.
Expand Down

0 comments on commit 4f901ea

Please sign in to comment.