Skip to content

refactor duplicate build definition (Fixes #12) #33

refactor duplicate build definition (Fixes #12)

refactor duplicate build definition (Fixes #12) #33

Workflow file for this run

name: Python package
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
first_build:
name: Build for (${{ matrix.python-version }}, ${{ matrix.os }}; first build)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest'] # In first build we only test 1 os
python-version: ['3.11'] # In first build we only test 1 python version
steps:
- name: Check CWD
shell: bash -e {0}
run: |
cwd
pwd
- uses: ./.github/actions/install-test-and-build
with:
python-version: ${{ matrix.python-version }}
other_builds:
name: Build for (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs: first_build
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
python-version: [ '3.8', '3.11' ] # Only first and last supported versions
exclude:
# already tested in first_build job
- python-version: 3.11
os: ubuntu-latest
steps:
- uses: ./.github/actions/install-test-and-build
with:
python-version: ${{ matrix.python-version }}
lint:
name: Linting build
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Python info
shell: bash -e {0}
run: |
which python3
python3 --version
- name: Upgrade pip and install dependencies
run: |
python3 -m pip install --upgrade pip setuptools
python3 -m pip install .[dev,publishing]
- name: Check style against standards using ruff
run: ruff .