✨ 🐛 [#410] audioware mod issues #433
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
| name: Testing | |
| # Packaging will take care of testing on pushes to the main branch, so we don't need it in this workflow. | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - "**" | |
| jobs: | |
| dependencies: | |
| name: Dependencies | |
| if: "!contains(github.event.commits[0].message, '[skip ci]')" | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| node: ["16.17.0"] | |
| npm: ["8.15.0"] | |
| steps: | |
| - name: Cancel previous runs | |
| uses: styfle/cancel-workflow-action@0.9.0 | |
| with: | |
| access_token: ${{ github.token }} | |
| - uses: actions/checkout@v2 | |
| - name: Setup Node.js 16.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 16.x | |
| cache: "npm" | |
| - name: Retrieve cached dependencies | |
| uses: actions/cache@v3 | |
| id: npm-cache | |
| with: | |
| path: | | |
| node_modules | |
| key: ${{ runner.os }}-windows-latest-${{ matrix.npm }}-${{ matrix.node }}-${{ hashFiles('package-lock.json') }} | |
| - name: Install dependencies' dependencies | |
| run: | | |
| pushd .. | |
| npm install node-gyp | |
| npm install autogypi | |
| popd | |
| - name: Install all dependencies | |
| if: steps.npm-cache.outputs.cache-hit != 'true' | |
| run: npm ci | |
| test: | |
| name: Tests | |
| needs: [dependencies] | |
| if: "!contains(github.event.commits[0].message, '[skip ci]')" | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| node: ["16.17.0"] | |
| npm: ["8.15.0"] | |
| steps: | |
| - name: Cancel previous runs | |
| uses: styfle/cancel-workflow-action@0.9.0 | |
| with: | |
| access_token: ${{ github.token }} | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 16.x | |
| cache: "npm" | |
| - name: Retrieve cached dependencies | |
| uses: actions/cache@v3 | |
| id: npm-cache | |
| with: | |
| path: | | |
| node_modules | |
| key: ${{ runner.os }}-windows-latest-${{ matrix.npm }}-${{ matrix.node }}-${{ hashFiles('package-lock.json') }} | |
| # - run: npm install | |
| - name: Run The Tests | |
| run: npm run test |