Skip to content

CI

CI #526

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches:
- "master"
pull_request:
branches:
- "*"
schedule:
- cron: "0 13 * * 1"
jobs:
build:
name: Build (${{ matrix.python-version }} | ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Cache conda
uses: actions/cache@v2
env:
# Increase this value to reset cache if ci/environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/environment.yml') }}
- uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: 'latest'
environment-file: ci/environment.yml
environment-name: test_env_xrft
init-shell: >-
bash
powershell
cache-environment: true
post-cleanup: 'all'
- name: Set up conda environment
shell: bash -l {0}
run: |
python -m pip install -e . --no-deps
conda list
- name: Run Tests
shell: bash -l {0}
run: |
pytest -n auto --cov=./ --cov-report=xml
- name: Upload code coverage to Codecov
uses: codecov/[email protected]
with:
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false