Skip to content

Add CODECOV_TOKEN for Codecov. #84

Add CODECOV_TOKEN for Codecov.

Add CODECOV_TOKEN for Codecov. #84

Workflow file for this run

name: tox
on:
# Trigger the tests workflow on push or pull requests.
push:
branches:
- "*"
pull_request:
branches:
- master
jobs:
run_tox:
name: tox -e ${{ matrix.toxenv }} (${{matrix.python-version}} on ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version:
- "3.12"
os:
- "ubuntu-latest"
toxenv:
- "ruff"
- "docs"
- "twine_check"
include:
- python-version: "3.9"
os: ubuntu-latest
toxenv: py39
- python-version: "3.10"
os: ubuntu-latest
toxenv: py310
- python-version: "3.11"
os: ubuntu-latest
toxenv: py311
- python-version: "3.12"
os: ubuntu-latest
toxenv: py312
- python-version: "3.13"
os: ubuntu-latest
toxenv: py313
- python-version: "3.12"
os: macos-latest
toxenv: py312
- python-version: "3.12"
os: windows-latest
toxenv: py312
# Steps to run in each job.
# Some are GitHub actions, others run shell commands.
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install coverage tox
python --version
pip --version
tox --version
coverage --version
- name: Run tests
run: tox -e ${{ matrix.toxenv }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
if: ${{ matrix.toxenv == 'py312' && matrix.os == 'ubuntu-latest' }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
env_vars: PYTHON
fail_ci_if_error: true
run_tox_with_postgres:
name: tox -e ${{ matrix.toxenv }} (${{matrix.python-version}} on ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.12"
os: ubuntu-latest
toxenv: postgresql
- python-version: "pypy3.9"
os: ubuntu-latest
toxenv: pypy3_postgresql
# Run the PostgreSQL database service.
services:
# Label used to access the service container.
postgres:
image: postgres
env:
POSTGRES_PASSWORD: verysecret
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Map TCP port 5432 on service container to the host
- "5432:5432"
# Steps to run in each job.
# Some are GitHub actions, others run shell commands.
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
python --version
pip --version
tox --version
- name: Run tests
env:
FALCON_SQLA_POSTGRESQL_URI: postgresql://postgres:verysecret@localhost/postgres
run: tox -e ${{ matrix.toxenv }}