ci(deps): update actions to latest versions #544
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
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: python_package | |
| on: | |
| push: | |
| branches: [ master, dev ] | |
| pull_request: | |
| branches: [ master, dev ] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| python-version: [ "3.11", "3.12", "3.13" , "3.14" ] | |
| os: [ ubuntu-latest, macos-latest ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| with: | |
| enable-cache: true | |
| - name: Install Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: make install-ci | |
| - name: Check formatting with black and isort | |
| run: make check-fmt | |
| - name: Lint with flake8 | |
| run: make lint | |
| - name: Test and generate coverage report with pytest | |
| run: | | |
| # have to do this as use of tmpdir in tests changes directory | |
| covg_report="$(pwd)/coverage.xml" | |
| uv run pytest --cov=snakefmt --cov-report=xml:$covg_report --cov-branch tests/ | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage.xml | |
| flags: unittests |