Skip to content

Polarised proton fits #68

Polarised proton fits

Polarised proton fits #68

name: Redo regressions
# start job only for PRs when a label is added.
on:
pull_request:
types: [labeled]
# some general variables
env:
# https://keras.io/getting_started/faq/#how-can-i-obtain-reproducible-results-using-keras-during-development
PYTHONHASHSEED: "0"
jobs:
build:
if: contains(github.event.pull_request.labels.*.name, 'redo-regressions')
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.11"]
include:
- os: ubuntu-latest
CONDA_OS: linux-64
fail-fast: false
runs-on: ${{ matrix.os }}
env:
NETRC_FILE: ${{ secrets.NETRC_FILE }}
NNPDF_SSH_KEY: ${{ secrets.NNPDF_SSH_KEY }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
use-mamba: true
auto-update-conda: true
activate-environment: test
- name: Setup conda and install LHAPDF and pandoc
shell: bash -l {0}
run: |
echo "$NETRC_FILE" | base64 --decode > ~/.netrc
conda config --remove channels defaults
conda config --append channels conda-forge
conda config --prepend channels https://packages.nnpdf.science/public
conda config --set show_channel_urls true
conda install lhapdf pandoc
- name: Install nnpdf with testing and qed extras
shell: bash -l {0}
run: |
pip install .[qed,tests]
- name: Regenerate regressions
shell: bash -l {0}
run: |
pytest extra_tests/regression_checks.py --regenerate True
- name: Commit
shell: bash -l {0}
run: |
git config user.name "Redo regressions bot"
git add extra_tests/regression_fits/*
git status
git commit -m "Automatically regenerated regressions from PR ${{ github.event.number }}, branch ${{ github.event.pull_request.head.ref }}."
git push origin "${{ github.event.pull_request.head.ref }}"