Skip to content

cleanup and standardize output names #109

cleanup and standardize output names

cleanup and standardize output names #109

Workflow file for this run

# 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:
check:
strategy:
matrix:
runner: [ubuntu-latest, macos-latest, windows-latest]
spec:
- 0.1.0-dev.21195
- "*"
- ">0.0.0"
- ">0.1.0-dev.20066 <0.1.0-dev.20074"
include:
- spec: 0.1.0-dev.21195
expect: 0.1.0-dev.21195
- spec: ">0.1.0-dev.20066 <0.1.0-dev.20074"
expect: 0.1.0-dev.20072
exclude:
# Windows is not supported by this version
- runner: windows-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: always()
runs-on: ubuntu-latest
steps:
- name: Raise failure
if: |
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled')
run: |
echo "::error::There are failing required jobs"
exit 1