Migration to pyproject.toml
#736
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: | |
- tox-env: py37-core | |
- tox-env: py38-core | |
- tox-env: py39-core | |
- tox-env: py310-core | |
- tox-env: py311-core | |
- 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: Set up Python ${{ matrix.python-version }} | |
if: ${{ matrix.tox-env == 'py37-core' }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
if: ${{ matrix.tox-env != 'py37-core' }} | |
run: | | |
uv tool install --python-preference only-managed --python 3.12 tox --with tox-uv # we need latest uv, tox, and tox-uv | |
- name: Install dependencies for Python 3.7 | |
if: ${{ matrix.tox-env == 'py37-core' }} | |
run: | | |
uv tool install --python-preference only-system tox | |
- 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 | |
if: ${{ matrix.tox-env != 'py37-core' }} | |
env: | |
TOXENV: ${{ matrix.tox-env }} | |
run: uvx --with tox-uv tox run | |
- name: Build for Python 3.7 | |
if: ${{ matrix.tox-env == 'py37-core' }} | |
env: | |
TOXENV: ${{ matrix.tox-env }} | |
run: uvx --python-preference only-system 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: | |
- tox-env: py37-postgres | |
- tox-env: py38-postgres | |
- tox-env: py39-postgres | |
- tox-env: py310-postgres | |
- tox-env: py311-postgres | |
- 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 | |
- 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: | |
- tox-env: py37-aws | |
- tox-env: py38-aws | |
- tox-env: py39-aws | |
- tox-env: py310-aws | |
- tox-env: py311-aws | |
- tox-env: py312-aws | |
- tox-env: py37-unixsocket | |
OVERRIDE_SKIP_CI_TESTS: True | |
- tox-env: py38-unixsocket | |
OVERRIDE_SKIP_CI_TESTS: True | |
- tox-env: py39-unixsocket | |
OVERRIDE_SKIP_CI_TESTS: True | |
- tox-env: py310-unixsocket | |
OVERRIDE_SKIP_CI_TESTS: True | |
- tox-env: py311-unixsocket | |
OVERRIDE_SKIP_CI_TESTS: True | |
- tox-env: py312-unixsocket | |
OVERRIDE_SKIP_CI_TESTS: True | |
- tox-env: py37-apache | |
- tox-env: py38-apache | |
- tox-env: py39-apache | |
- tox-env: py310-apache | |
- tox-env: py311-apache | |
- tox-env: py312-apache | |
- tox-env: py37-azureblob | |
- tox-env: py38-azureblob | |
- tox-env: py39-azureblob | |
- tox-env: py310-azureblob | |
- tox-env: py311-azureblob | |
- 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 | |
- 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: | |
- tox-env: flake8 | |
- 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 | |
- 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 |