CI #220
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: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: "0 0 * * *" # Daily “At 00:00” | |
workflow_dispatch: # allows you to trigger manually | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: ${{ matrix.os }}-${{ matrix.python-version }} | |
if: github.repository == 'rubisco-sfa/ilamb3' | |
runs-on: ${{ matrix.os }}-latest | |
timeout-minutes: 30 | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
os: [ubuntu] #, macos, windows] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Fetch all history for all branches and tags. | |
- name: Create conda environment | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
cache-downloads: true | |
environment-file: ci/environment.yml | |
environment-name: ilamb3-dev | |
create-args: >- | |
python=${{ matrix.python-version }} | |
- name: Install ilamb3 | |
run: | | |
python -m pip install -e . --no-deps --force-reinstall | |
- name: Run Tests | |
run: | | |
python -m pytest | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4.0.1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: false |