Implementing ATLAS_PH-8TEV_XSEC #288
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: 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') | |
runs-on: ubuntu-latest | |
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: "3.12" | |
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 config user.email "<>" | |
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 }}" |