[pre-commit.ci] pre-commit autoupdate #57
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: | |
pull_request: | |
workflow_dispatch: # allows you to trigger manually | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
detect-ci-trigger: | |
name: detect ci trigger | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' || github.event_name == 'pull_request' | |
outputs: | |
triggered: ${{ steps.detect-trigger.outputs.trigger-found }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- uses: xarray-contrib/ci-trigger@v1.1 | |
id: detect-trigger | |
with: | |
keyword: "[skip-ci]" | |
test: # Runs testing suite with minimal dependencies | |
name: pytest | |
runs-on: ubuntu-latest | |
needs: detect-ci-trigger | |
if: needs.detect-ci-trigger.outputs.triggered == 'false' | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Fetch all history for all branches and tags. | |
- name: Set up conda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: false | |
channels: conda-forge | |
mamba-version: '*' | |
activate-environment: test-env | |
python-version: 3.8 | |
- name: Set up conda environment | |
run: | | |
mamba env update -f environment.yml | |
- name: Conda info | |
run: conda info | |
- name: Conda list | |
run: conda list | |
- name: install car-referencer | |
run: | | |
python setup.py develop | |
- name: Run tests | |
run: py.test |