Ready for version 1.0.0 #10
Workflow file for this run
This file contains hidden or 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
| # Note: add all job names to the deploy-status.needs. | |
| name: Tests | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| test_programs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.13 | |
| - name: Install python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install .[tests] | |
| - name: Install compilation dependencies | |
| run: | | |
| sudo apt-get install -y picolibc-riscv64-unknown-elf | |
| - name: Test pytest | |
| run: | | |
| pytest -n auto -vv --junitxml=./run-test-results.xml | |
| - name: Show tests results | |
| if: always() | |
| uses: pmeier/pytest-results-action@main | |
| with: | |
| path: ./*-test-results.xml | |
| # This allows us to have a branch protection rule this entire workflow | |
| deploy-status: | |
| runs-on: ubuntu-latest | |
| needs: [ test_programs ] | |
| if: always() | |
| steps: | |
| - name: Successful deploy | |
| if: ${{ !(contains(needs.*.result, 'failure')) }} | |
| run: exit 0 | |
| - name: Failing deploy | |
| if: ${{ contains(needs.*.result, 'failure') }} | |
| run: exit 1 |