DM-43369: Drop distutils and modernize ruff usage #72
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_and_test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build_and_test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
pyversion: ["3.10", "3.11"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: ${{ matrix.pyversion }} | |
auto-update-conda: true | |
channels: conda-forge,defaults | |
miniforge-variant: Mambaforge | |
use-mamba: true | |
channel-priority: strict | |
show-channel-urls: true | |
- name: Install conda packages used by this package | |
shell: bash -l {0} | |
run: | | |
mamba install -y -q scons eups compilers ruff flake8 | |
# We have two cores so we can speed up the testing with xdist | |
- name: Install pytest packages | |
shell: bash -l {0} | |
run: | | |
mamba install -y -q \ | |
pytest pytest-xdist pytest-openfiles pytest-cov pytest-session2file | |
- name: List installed packages | |
shell: bash -l {0} | |
run: | | |
mamba list | |
pip list -v | |
- name: Build and test | |
shell: bash -l {0} | |
run: | | |
setup -k -r . | |
scons -j2 | |
- name: Upload coverage to codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
file: tests/.tests/pytest-sconsUtils.xml-cov-sconsUtils.xml |