Skip to content

Configure funding sources in FUNDING.yml #104

Configure funding sources in FUNDING.yml

Configure funding sources in FUNDING.yml #104

Workflow file for this run

name: test
on:
push:
branches: [main]
pull_request:
branches: [main]
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@v5
- 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/main-${{ 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@v5
- 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/main-${{ 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 }}

Check warning on line 92 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / test

Workflow syntax warning

.github/workflows/test.yml (Line: 92, Col: 13): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: make upload-coverage