build(deps-dev): bump @types/node from 20.14.1 to 22.5.2 #243
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
# Copyright 2022 leorize <[email protected]> | |
# | |
# SPDX-License-Identifier: MIT | |
name: Test whether action works | |
on: | |
push: {} | |
pull_request: {} | |
schedule: | |
# Run the check weekly so we can be sure that it still works | |
- cron: "0 0 * * 0" | |
jobs: | |
filter: | |
name: Check if tests should be run | |
runs-on: ubuntu-latest | |
outputs: | |
should-skip: ${{ steps.filter.outputs.should_skip }} | |
steps: | |
- uses: fkirc/[email protected] | |
id: filter | |
with: | |
# Only run when code used by the action changed. | |
paths: | | |
[ | |
"dist/**", | |
".github/nimskull-problem-matcher.json", | |
".github/workflows/test.yml" | |
] | |
check: | |
needs: filter | |
if: needs.filter.outputs.should-skip != 'true' | |
strategy: | |
matrix: | |
runner: [ubuntu-latest, macos-latest, macos-13, windows-latest] | |
spec: | |
- 0.1.0-dev.21199 | |
- "*" | |
- ">0.0.0" | |
- ">0.1.0-dev.20066 <0.1.0-dev.20074" | |
- ">0.1.0-dev.21330 <0.1.0-dev.21332" | |
include: | |
- spec: 0.1.0-dev.21199 | |
expect: 0.1.0-dev.21199 | |
- spec: ">0.1.0-dev.20066 <0.1.0-dev.20074" | |
expect: 0.1.0-dev.20072 | |
- spec: ">0.1.0-dev.21330 <0.1.0-dev.21332" | |
expect: 0.1.0-dev.21331 | |
exclude: | |
# Windows is not supported by this version | |
- runner: windows-latest | |
spec: ">0.1.0-dev.20066 <0.1.0-dev.20074" | |
# ARM macOS is not supported by this version | |
- runner: macos-latest | |
spec: ">0.1.0-dev.20066 <0.1.0-dev.20074" | |
name: Test installation for spec ${{ matrix.spec }} on ${{ matrix.runner }} | |
runs-on: ${{ matrix.runner }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install for spec ${{ matrix.spec }} | |
id: install | |
uses: ./ | |
with: | |
nimskull-version: ${{ matrix.spec }} | |
check-latest: true | |
- name: The installed version is incorrect | |
if: | | |
matrix.expect && | |
matrix.expect != steps.install.outputs.nimskull-version | |
run: | | |
echo "::error::Expected version ${{ matrix.expect }} but got ${{ steps.install.outputs.version }}" | |
exit 1 | |
shell: bash | |
- name: The compiler works | |
run: | | |
nim --version | |
cat << "EOF" > test.nim | |
echo "Hello, world!" | |
EOF | |
nim c -r test.nim | |
shell: bash | |
success: | |
name: All action tests passed | |
needs: [check] | |
if: cancelled() || failure() | |
runs-on: ubuntu-latest | |
steps: | |
- name: Raise failure | |
run: | | |
echo "::error::There are failing required jobs" | |
exit 1 |