Run lint and test #3
This file contains 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: Run lint and test | |
on: | |
workflow_dispatch: | |
inputs: | |
node_versions: | |
description: 'Select Node versions' | |
required: true | |
default: '["18.x", "20.x", "22.x"]' | |
type: choice | |
options: | |
- '["18.x"]' | |
- '["20.x"]' | |
- '["22.x"]' | |
- '["20.x", "22.x"]' | |
- '["18.x", "20.x", "22.x"]' | |
os_version: | |
description: 'Select OS' | |
required: true | |
default: '["ubuntu-latest"]' | |
type: choice | |
options: | |
- '["ubuntu-latest"]' | |
- '["windows-latest"]' | |
- '["macos-latest"]' | |
fail_fast: | |
description: 'Use fail-fast' | |
required: true | |
type: boolean | |
jobs: | |
test: | |
name: Test (Node ${{ matrix.node-version }} on ${{ matrix.os }}) | |
strategy: | |
fail-fast: ${{ inputs.fail_fast }} | |
matrix: | |
os: ${{ fromJSON(inputs.os_version) }} | |
node-version: ${{ fromJSON(inputs.node_versions) }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
repository: vHeemstra/is-apng | |
- name: Install Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm install | |
- run: npm run lint | |
- run: npm run build | |
- run: npm run test |