DM-42226: Write python package metadata #104
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.11", "3.12", "3.13"] | |
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: Miniforge3 | |
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-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@v4 | |
with: | |
files: tests/.tests/pytest-sconsUtils.xml-cov-sconsUtils.xml | |
token: ${{ secrets.CODECOV_TOKEN }} |