Files
npm-audit-action/.github/workflows/test.yml
dependabot[bot] f761856646 build(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-08 14:34:15 +00:00

103 lines
2.8 KiB
YAML

name: "build-test"
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
jobs:
build: # make sure build/ci work properly
strategy:
matrix:
node: [18]
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: |
npm ci
npm run all
- uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
build-on-windows:
strategy:
matrix:
node: [18]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
# https://stackoverflow.com/questions/72401421/message-npm-warn-config-global-global-local-are-deprecated-use-loc
- run: |
npm install npm-windows-upgrade --location=global
npm-windows-upgrade --npm-version latest
- run: |
npm ci
npm run all
test: # make sure the action works on a clean machine without building
strategy:
matrix:
node: [18]
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: ./
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
issue_title: npm audit run by test job
create_issues: false
production_flag: true
- uses: ./
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
working_directory: __tests__/testdata/workdir/
create_issues: false
production_flag: true
test-on-windows:
strategy:
matrix:
node: [18]
runs-on: windows-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
# https://stackoverflow.com/questions/72401421/message-npm-warn-config-global-global-local-are-deprecated-use-loc
- run: |
npm install npm-windows-upgrade --location=global
npm-windows-upgrade --npm-version latest
- uses: ./
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
issue_title: npm audit run by test job
create_issues: false
production_flag: true
- uses: ./
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
working_directory: __tests__/testdata/workdir/
create_issues: false
production_flag: true