Skip to content

Merge pull request #198 from NNPDF/pre-commit-ci-update-config #1003

Merge pull request #198 from NNPDF/pre-commit-ci-update-config

Merge pull request #198 from NNPDF/pre-commit-ci-update-config #1003

Workflow file for this run

name: benchmarks
on: push
jobs:
bench:
name: Benchmarks
runs-on: ubuntu-latest
container:
image: ghcr.io/nnpdf/lhapdf:v2
credentials:
username: ${{ github.repository_owner }}
password: ${{ github.token }}
steps:
- uses: actions/checkout@v2
with:
# tags needed for dynamic versioning
fetch-depth: 0
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
installer-parallel: true
- name: Install dependencies
run: poetry install --no-interaction --no-root --with test -E nnpdf
- name: Install project
# it is required to repeat extras, otherwise they will be removed from
# the environment
run: poetry install --no-interaction -E nnpdf
- name: Install task runner
run: pip install poethepoet
- name: Lint with pylint
run: |
# Search for actual errors
poe lint
# For warnings instead return always zero
poe lint-warnings
- name: Get data files
id: cache-data-files
uses: actions/cache@v3
with:
path: data_files
key: data_files-v2
- name: Download data files
if: steps.cache-data_files.outputs.cache-hit != 'true'
run: |
sh download_test_data.sh
- name: Test with pytest
run: |
poe bench
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: ./coverage.xml
flags: bench
name: codecov-umbrella
fail_ci_if_error: false