Update dependency pytest to v8 #78
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: test | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
env: | |
POETRY_VIRTUALENVS_IN_PROJECT: "true" | |
POETRY_VERSION: "1.3.1" | |
MAIN_PYTHON_VERSION: "3.11" | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python - | |
echo "$HOME/.poetry/bin" >> $GITHUB_PATH | |
- name: Cache Poetry cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: poetry-cache-${{ github.ref }}-${{ github.workflow }}-${{ github.job }}-${{ env.MAIN_PYTHON_VERSION }}-${{ env.POETRY_VERSION }} | |
- name: Cache packages | |
uses: actions/cache@v4 | |
with: | |
path: .venv | |
key: poetry-packages-${{ github.ref }}-${{ github.workflow }}-${{ github.job }}-${{ env.MAIN_PYTHON_VERSION }}-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: poetry-packages-refs/heads/master-${{ github.workflow }}-${{ github.job }}-${{ env.MAIN_PYTHON_VERSION }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
run: make install | |
- name: Lint | |
run: make lint | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python - | |
echo "$HOME/.poetry/bin" >> $GITHUB_PATH | |
- name: Cache Poetry cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: poetry-cache-${{ github.ref }}-${{ github.workflow }}-${{ github.job }}-${{ matrix.python-version }}-${{ env.POETRY_VERSION }} | |
- name: Cache packages | |
uses: actions/cache@v4 | |
with: | |
path: .venv | |
key: poetry-packages-${{ github.ref }}-${{ github.workflow }}-${{ github.job }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: poetry-packages-refs/heads/master-${{ github.workflow }}-${{ github.job }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
run: make install | |
- name: Test | |
run: make test-with-coverage | |
- name: Upload coverage | |
if: matrix.python-version == ${{ env.MAIN_PYTHON_VERSION }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
run: make upload-coverage |