Merge pull request #2 from mtsokol/build-update #3
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
jobs: | |
test: | |
defaults: | |
run: | |
shell: bash -el {0} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python: ['3.9', '3.10', '3.11'] | |
include: | |
- os: macos-latest | |
python: '3.9' | |
- os: windows-latest | |
python: '3.9' | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
env: | |
PYTHON_VERSION: ${{ matrix.python }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Cache conda | |
uses: actions/cache@v3 | |
env: | |
# Increase this value to reset cache if ci/environment.yml has not changed | |
CACHE_NUMBER: 0 | |
with: | |
path: ~/conda_pkgs_dir | |
key: | |
test-${{ matrix.os }}-conda-py${{ matrix.python }}-${{ env.CACHE_NUMBER }}-${{ | |
hashFiles('ci/environment.yml') }} | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: finch-tensor-dev | |
allow-softlinks: true | |
environment-file: ci/environment.yml | |
python-version: ${{ matrix.python }} | |
miniforge-variant: Miniforge | |
use-only-tar-bz2: true | |
use-mamba: true | |
- name: Install package | |
run: | | |
pip install -e .[tests] | |
- name: Run tests | |
run: | | |
pytest tests -vv | |
- uses: codecov/codecov-action@v3 | |
if: always() | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action/composite@v1 | |
if: always() | |
with: | |
files: "**/test-*.xml" | |
on: | |
# Trigger the workflow on push or pull request, | |
# but only for the main branch | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main |