diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index b0108d7..016087a 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -9,7 +9,7 @@ jobs: name: npm audit strategy: matrix: - os: [ ubuntu-latest, windows-latest, macos-latest ] + os: [ ubuntu-latest, macos-latest ] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -21,3 +21,21 @@ jobs: issue_assignees: oke-py issue_labels: vulnerability dedupe_issues: true + + scan-on-windows: + name: npm audit + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + # 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 + - name: install dependencies + run: npm ci + - uses: oke-py/npm-audit-action@v2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + issue_assignees: oke-py + issue_labels: vulnerability + dedupe_issues: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 600a873..323c8d8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: build: # make sure build/ci work properly strategy: matrix: - os: [ ubuntu-latest, windows-latest, macos-latest ] + os: [ ubuntu-latest, macos-latest ] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -21,10 +21,22 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} + build-on-windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + # 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: - os: [ ubuntu-latest, windows-latest, macos-latest ] + os: [ ubuntu-latest, macos-latest ] runs-on: ${{ matrix.os }} steps: - name: Dump GitHub context @@ -40,3 +52,24 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} working_directory: __tests__/testdata/workdir/ + + test-on-windows: + runs-on: windows-latest + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" + - uses: actions/checkout@v3 + # 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 + - uses: ./ + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + working_directory: __tests__/testdata/workdir/