Skip to content

Update dependencies #41

Update dependencies

Update dependencies #41

name: npm-dependency-vulnerabilities test
on:
pull_request:
push:
branches:
- master
paths:
- npm-dependency-vulnerabilities
workflow_dispatch:
jobs:
units:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path:
- './actions/npm-dependency-duplications/package-lock.json'

Check failure on line 22 in .github/workflows/check_dependency_vulnerabilities.yml

View workflow run for this annotation

GitHub Actions / npm-dependency-vulnerabilities test

Invalid workflow file

The workflow is not valid. .github/workflows/check_dependency_vulnerabilities.yml (Line: 22, Col: 13): A sequence was not expected .github/workflows/check_dependency_vulnerabilities.yml (Line: 41, Col: 13): A sequence was not expected
- './actions/npm-dependency-vulnerabilities/package-lock.json'
- name: Run tests
working-directory: ./actions/npm-dependency-vulnerabilities
run: |
npm ci
npm run test
check-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path:
- './actions/npm-dependency-duplications/package-lock.json'
- './actions/npm-dependency-vulnerabilities/package-lock.json'
- name: Install dependencies and build
working-directory: ./actions/npm-dependency-vulnerabilities
run: |
npm ci
npm run prepare
- name: Compare the expected and actual dist/ directories
working-directory: ./actions/npm-dependency-vulnerabilities
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
id: diff
# If index.js was different from expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v4
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist
path: actions/npm-dependency-vulnerabilities/dist/
# test action works running from the graph
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./actions/npm-dependency-vulnerabilities