setup.py -> pyproject.toml #27
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: pytest | |
on: | |
pull_request: | |
push: | |
branches: [ main ] | |
env: | |
PACKAGE: xleaf | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Conda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
- name: Create Linux environment and build package | |
run: | | |
make create | |
if: matrix.os == 'ubuntu-latest' | |
- name: Create MacOS environment and build package | |
shell: /bin/zsh {0} | |
run: | | |
conda env create --file environment.yaml | |
conda run -n ${{ env.PACKAGE }} --no-capture-output pip install . | |
if: matrix.os == 'macos-latest' | |
- name: Run pytest | |
run: | | |
make test |