[pre-commit.ci] pre-commit autoupdate #561
Workflow file for this run
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: | |
pull_request: | |
workflow_dispatch: # allows you to trigger manually | |
jobs: | |
pre-job: | |
runs-on: ubuntu-latest | |
outputs: | |
should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
steps: | |
- id: skip_check | |
uses: fkirc/skip-duplicate-actions@master | |
with: | |
concurrent_skipping: 'same_content' | |
skip_after_successful_duplicate: 'false' | |
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' | |
paths_ignore: '["**/docs/**"]' | |
build: | |
needs: pre-job | |
if: ${{ needs.pre-job.outputs.should_skip != 'true' }} | |
name: python-${{ matrix.python-version }} | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.7', '3.8', '3.9'] | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- uses: actions/checkout@v4 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
channels: conda-forge | |
miniforge-variant: Mambaforge | |
activate-environment: pythia-datasets | |
auto-update-conda: false | |
python-version: ${{ matrix.python-version }} | |
environment-file: ci/environment.yml | |
- name: Set up conda environment | |
run: | | |
python -m pip install -e . | |
conda list | |
- name: Run Tests | |
run: | | |
python -m pytest --cov=./ --cov-report=xml --verbose | |
- 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 |