ci #1037
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: ci | |
on: | |
push: | |
branches: | |
- "master" | |
pull_request: | |
branches: | |
- "master" | |
schedule: | |
# Run a cron job once daily | |
- cron: "0 0 * * *" | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macOS-latest, ubuntu-latest] | |
python-version: ["3.8", "3.9", "3.10"] | |
env: | |
PYVER: ${{ matrix.python-version }} | |
PACKAGE: paprika | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
environment-file: devtools/conda-envs/test_env.yaml | |
channel-priority: true | |
channels: conda-forge, defaults | |
activate-environment: paprika-dev | |
auto-update-conda: true | |
auto-activate-base: false | |
miniforge-version: latest | |
miniforge-variant: Mambaforge | |
use-mamba: true | |
mamba-version: "*" | |
- name: Additional info about the build | |
shell: bash | |
run: | | |
uname -a | |
df -h | |
ulimit -a | |
- name: Environment Information | |
shell: bash -l {0} | |
run: | | |
conda info --all | |
conda list | |
- name: Install package | |
shell: bash -l {0} | |
run: | | |
python -m pip install --no-deps . | |
- name: Run tests | |
shell: bash -l {0} | |
run: | | |
PYTEST_ARGS=" -v --cov=$PACKAGE --cov-report=xml " | |
pytest $PYTEST_ARGS $PACKAGE | |
- name: Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
fail_ci_if_error: true |