Skip to content

CI

CI #401

Workflow file for this run

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 == 'esgf2-us/intake-esgf'
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 30
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
os: [macos, ubuntu, 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: intake-esgf-dev
create-args: >-
python=${{ matrix.python-version }}
- name: Install intake-esgf
run: |
python -m pip install -e . --no-deps --force-reinstall
- name: Run Tests
run: |
python -m pytest
- 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