Migration to pyproject.toml
#717
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: Build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
core: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
include: | |
- python-version: "3.7" | |
tox-env: py37-core | |
- python-version: "3.8" | |
tox-env: py38-core | |
- python-version: "3.9" | |
tox-env: py39-core | |
- python-version: "3.10" | |
tox-env: py310-core | |
- python-version: "3.11" | |
tox-env: py311-core | |
- python-version: "3.12" | |
tox-env: py312-core | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up the latest version of uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "pyproject.toml" | |
- name: Install dependencies | |
run: | | |
uv tool install --python-preference only-managed --python 3.12 tox --with tox-uv # we need latest uv, tox, and tox-uv | |
uv python install --python-preference only-managed ${{ matrix.python-version }} | |
- name: Setup MySQL DB | |
run: | | |
sudo /etc/init.d/mysql start | |
mysql -e 'create database IF NOT EXISTS luigi_test;' -uroot -proot || true | |
mysql -e 'create user 'travis'@'localhost';' -uroot -proot || true | |
mysql -e 'grant all privileges ON *.* TO 'travis'@'localhost';' -uroot -proot || true | |
- name: Build | |
env: | |
TOXENV: ${{ matrix.tox-env }} | |
run: uvx --with tox-uv tox run | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
fail_ci_if_error: true | |
verbose: true | |
postgres: | |
runs-on: ubuntu-20.04 | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
ports: | |
- 5432:5432 | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
strategy: | |
matrix: | |
include: | |
- python-version: "3.7" | |
tox-env: py37-postgres | |
- python-version: "3.8" | |
tox-env: py38-postgres | |
- python-version: "3.9" | |
tox-env: py39-postgres | |
- python-version: "3.10" | |
tox-env: py310-postgres | |
- python-version: "3.11" | |
tox-env: py311-postgres | |
- python-version: "3.12" | |
tox-env: py312-postgres | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up the latest version of uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "pyproject.toml" | |
- name: Install dependencies | |
run: | | |
uv tool install --python-preference only-managed --python 3.12 tox --with tox-uv # we need latest uv, tox, and tox-uv | |
uv python install --python-preference only-managed ${{ matrix.python-version }} | |
- name: Create PSQL database | |
run: | | |
PGPASSWORD=postgres psql -h localhost -p 5432 -c 'create database spotify;' -U postgres | |
- name: Build | |
env: | |
TOXENV: ${{ matrix.tox-env }} | |
run: uvx --with tox-uv tox run | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
fail_ci_if_error: true | |
verbose: true | |
base: | |
runs-on: ubuntu-20.04 | |
env: | |
AWS_DEFAULT_REGION: us-east-1 | |
AWS_ACCESS_KEY_ID: accesskey | |
AWS_SECRET_ACCESS_KEY: secretkey | |
strategy: | |
matrix: | |
include: | |
- python-version: "3.7" | |
tox-env: py37-aws | |
- python-version: "3.8" | |
tox-env: py38-aws | |
- python-version: "3.9" | |
tox-env: py39-aws | |
- python-version: "3.10" | |
tox-env: py310-aws | |
- python-version: "3.11" | |
tox-env: py311-aws | |
- python-version: "3.12" | |
tox-env: py312-aws | |
- python-version: "3.7" | |
tox-env: py37-unixsocket | |
OVERRIDE_SKIP_CI_TESTS: True | |
- python-version: "3.8" | |
tox-env: py38-unixsocket | |
OVERRIDE_SKIP_CI_TESTS: True | |
- python-version: "3.9" | |
tox-env: py39-unixsocket | |
OVERRIDE_SKIP_CI_TESTS: True | |
- python-version: "3.10" | |
tox-env: py310-unixsocket | |
OVERRIDE_SKIP_CI_TESTS: True | |
- python-version: "3.11" | |
tox-env: py311-unixsocket | |
OVERRIDE_SKIP_CI_TESTS: True | |
- python-version: "3.12" | |
tox-env: py312-unixsocket | |
OVERRIDE_SKIP_CI_TESTS: True | |
- python-version: "3.7" | |
tox-env: py37-apache | |
- python-version: "3.8" | |
tox-env: py38-apache | |
- python-version: "3.9" | |
tox-env: py39-apache | |
- python-version: "3.10" | |
tox-env: py310-apache | |
- python-version: "3.11" | |
tox-env: py311-apache | |
- python-version: "3.12" | |
tox-env: py312-apache | |
- python-version: "3.7" | |
tox-env: py37-azureblob | |
- python-version: "3.8" | |
tox-env: py38-azureblob | |
- python-version: "3.9" | |
tox-env: py39-azureblob | |
- python-version: "3.10" | |
tox-env: py310-azureblob | |
- python-version: "3.11" | |
tox-env: py311-azureblob | |
- python-version: "3.12" | |
tox-env: py312-azureblob | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up the latest version of uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "pyproject.toml" | |
- name: Install dependencies | |
run: | | |
uv tool install --python-preference only-managed --python 3.12 tox --with tox-uv # we need latest uv, tox, and tox-uv | |
uv python install --python-preference only-managed ${{ matrix.python-version }} | |
- name: Build | |
env: | |
TOXENV: ${{ matrix.tox-env }} | |
OVERRIDE_SKIP_CI_TESTS: ${{ matrix.OVERRIDE_SKIP_CI_TESTS }} | |
run: uvx --with tox-uv tox run | |
- name: Upload coverage to Codecov | |
if: ${{ matrix.tox-env != 'flake8' && matrix.tox-env != 'docs' }} | |
uses: codecov/codecov-action@v5 | |
with: | |
fail_ci_if_error: true | |
verbose: true | |
others: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
include: | |
- python-version: "3.10" | |
tox-env: flake8 | |
- python-version: "3.10" | |
tox-env: docs | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up the latest version of uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "pyproject.toml" | |
- name: Install dependencies | |
run: | | |
uv tool install --python-preference only-managed --python 3.12 tox --with tox-uv # we need latest uv, tox, and tox-uv | |
uv python install --python-preference only-managed ${{ matrix.python-version }} | |
uv python pin ${{ matrix.python-version }} | |
- name: Build | |
env: | |
TOXENV: ${{ matrix.tox-env }} | |
OVERRIDE_SKIP_CI_TESTS: ${{ matrix.OVERRIDE_SKIP_CI_TESTS }} | |
run: uvx --with tox-uv tox run | |
- name: Upload coverage to Codecov | |
if: ${{ matrix.tox-env != 'flake8' && matrix.tox-env != 'docs' }} | |
uses: codecov/codecov-action@v5 | |
with: | |
fail_ci_if_error: true | |
verbose: true |