Files
npm-audit-action/.github/workflows/test.yml
Shaid Khan 33a41db91d Fix Commit - Committing fix whereby NPM Audit Actions Fails when running on Windows OS (#122)
- This commit is to fix an issue when running the 'npm-audit-action' on the 'windows-latest'
- Integrated the 'spawnSync' to use the right 'npm' script based upon the OS used
2022-05-12 07:45:03 +09:00

43 lines
1.1 KiB
YAML

name: "build-test"
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
- 'releases/*'
jobs:
build: # make sure build/ci work properly
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- run: |
npm ci
npm run all
- uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
test: # make sure the action works on a clean machine without building
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v3
- uses: ./
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
issue_title: npm audit run by test job
- uses: ./
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
working_directory: __tests__/testdata/workdir/