Automatically check Makesurefile samples correctness in README #144 #862
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
on: | |
- "push" | |
# - "pull_request" | |
name: "Run tests" | |
jobs: | |
nix: | |
name: "Tests *nix / all awks" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, macos-13 ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
id: cache-soft | |
with: | |
path: soft | |
key: ${{ matrix.os }}-${{ hashFiles('Makesurefile') }}-soft--all-2 | |
- name: "run tests" | |
run: | | |
./makesure tested_awks | |
# https://github.com/marketplace/actions/freebsd-vm | |
# https://github.com/vmactions/freebsd-vm | |
freebsd: | |
runs-on: macos-12 | |
name: "Tests on FreeBSD" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Tests in FreeBSD | |
id: test | |
uses: vmactions/freebsd-vm@v0.3.0 | |
with: | |
usesh: true | |
prepare: | | |
pkg install -y curl | |
# pkg install -y wget | |
pkg install -y bash | |
# pkg install -y gawk | |
run: | | |
echo "---------------------------------------" | |
freebsd-version | |
pwd | |
ls -l | |
bash --version || true | |
awk --version || true | |
gawk --version || true | |
curl --version || true | |
wget --version || true | |
echo "=======================================" | |
set -e | |
./makesure | |
macos_gawk: | |
name: "Tests macos / gawk" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macos-11, macos-12, macos-13 ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
id: cache-soft | |
with: | |
path: soft | |
key: ${{ matrix.os }}-soft--macos-gawk | |
- name: "run tests" | |
run: | | |
# TODO understand if this step can be cached | |
brew install gawk | |
PATH="/usr/local/opt/gawk/libexec/gnubin:$PATH" \ | |
./makesure | |
win: | |
name: "Tests Win" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ windows-2019, windows-2022 ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
id: cache-soft | |
with: | |
path: soft | |
key: ${{ matrix.os }}-soft--win | |
- name: "run tests" | |
run: | | |
& bash -e -c "./makesure" |