chore(deps): lock file maintenance (#392) #840
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
| name: Build and Test | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| if: ${{ !contains(github.event.head_commit.message, '[ci skip]') || github.event_name == 'workflow_dispatch' }} | |
| strategy: | |
| matrix: | |
| node: | |
| - name: LTS | |
| version: lts/* | |
| - name: Previous LTS | |
| version: lts/-1 | |
| - name: Current | |
| version: node | |
| name: 'Build and test (Node: ${{ matrix.node.name }})' | |
| steps: | |
| - name: Check out the code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Set up Node.js environment | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: ${{ matrix.node.version }} | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci --ignore-scripts | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run postinstall scripts | |
| run: npm rebuild && npm run prepare --if-present | |
| - name: Force package build | |
| run: npm run build | |
| - name: Run tests | |
| run: npm test |