Bump actions/checkout from 4.0.0 to 4.1.1 (#89) #10
Workflow file for this run
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: Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
env: | |
DEFAULT_PYTHON: "3.11" | |
jobs: | |
pytest: | |
name: Testing on Python ${{ matrix.python-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11", "3.12"] | |
steps: | |
- name: ⤵️ Checkout code | |
uses: actions/[email protected] | |
- name: 🐍 Setup Python ${{ matrix.python-version }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: 🚧 Install dependencies | |
run: pip install . .[test] | |
- name: 🚀 Run Pytest | |
run: pytest --cov pypaperless tests | |
- name: ⬆️ Upload coverage | |
uses: actions/[email protected] | |
with: | |
name: coverage-${{ matrix.python-version }} | |
path: .coverage | |
coverage: | |
name: Coverage report | |
runs-on: ubuntu-latest | |
needs: pytest | |
steps: | |
- name: ⤵️ Checkout code | |
uses: actions/[email protected] | |
- name: ⬇️ Download coverage | |
uses: actions/[email protected] | |
- name: 🐍 Setup Python ${{ env.DEFAULT_PYTHON }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
- name: 🚧 Install dependencies | |
run: pip install . .[test] | |
- name: 🚀 Process coverage results | |
run: | | |
coverage combine coverage*/.coverage* | |
coverage xml -i | |
- name: ⬆️ Upload coverage to Codecov | |
uses: codecov/[email protected] | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
file: ./coverage.xml |