Test #146
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: "Test" | |
on: | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- 'screenshots/**' | |
- 'windows/**' | |
push: | |
paths-ignore: | |
- '**.md' | |
- 'screenshots/**' | |
- 'windows/**' | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
description: 'Enable debug' | |
type: boolean | |
required: false | |
default: false | |
jobs: | |
transcribe: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
shell: [shell, shell-bin] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: azuwis/nix-action@main | |
with: | |
key: pianotrans-${{ matrix.shell }}-${{ hashFiles('flake.*', 'nix/**') }} | |
- uses: cachix/cachix-action@v12 | |
with: | |
name: azuwis | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
pushFilter: (-source$|\.whl$) | |
- uses: lhotari/action-upterm@v1 | |
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
with: | |
limit-access-to-actor: true | |
- name: Build nix devShell | |
run: | | |
# build nix devShell, and create profile to prevent gc | |
echo "Build nix devShell" | |
nix --print-build-logs develop .#${{ matrix.shell }} --profile ~/.local/state/nix/profiles/shell --command true | |
- name: Test transcribe | |
run: | | |
nix --print-build-logs develop .#${{ matrix.shell }} --command ./PianoTrans.py --cli test/cut_liszt.opus test/cut_liszt.opus test/cut_liszt.opus test/cut_liszt.opus test/cut_liszt.opus | |
test -e test/cut_liszt.opus.mid | |
- uses: azuwis/nix-action@post |