Upgrade actions/checkout to resolve compatibility issue with checkout@v6 #32
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
| name: Pytest | |
| on: [push, pull_request, workflow_dispatch] | |
| jobs: | |
| test: | |
| permissions: | |
| contents: write # Update Coverage Badge needs write permission to push to gh-pages | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.10" | |
| # Install and Test Example | |
| - name: Install and Test Example | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest pytest-cov | |
| # pip install -r requirements.txt | |
| - name: Test | |
| run: | | |
| cd example | |
| python -m pytest --cov --cov-report json | |
| cp coverage.json .. | |
| cd .. | |
| # Add this | |
| - name: Update Coverage Badge | |
| # GitHub actions: default branch variable | |
| # https://stackoverflow.com/questions/64781462/github-actions-default-branch-variable | |
| # if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) | |
| uses: ./ |