Skip to content

Commit d2941af

Browse files
committed
added comments to actions and workflows
1 parent bcca428 commit d2941af

File tree

3 files changed

+42
-4
lines changed

3 files changed

+42
-4
lines changed

.github/actions/install_conda_pip/action.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
name: Install nnpdf using pip under a conda environment
22

3+
# This composite action installs NNPDF using pip
4+
# under a conda environment which is used to install lhapdf and pandoc
5+
# see https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action
6+
7+
# Use it as a step of your workflow as:
8+
# - uses: ./.github/actions/install_conda_pip
9+
#
10+
# It is possible to modify the python version of the default environment with
11+
# with:
12+
# python-version: "3.12"
13+
#
14+
# And the extras to be installed with. The string nnpdf-extras will be passed to pip directly.
15+
# with:
16+
# nnpdf-extras: "[qed,tests]"
17+
#
18+
# Remember that these actions are only available after checking out the repository,
19+
# which should always be the first step!
20+
# - uses: actions/checkout@v4
21+
322
inputs:
423
python-version:
524
required: true

.github/actions/prepare_environment/action.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
1-
name: Prepare environment
1+
name: Prepare a conda environment for NNPDF installation
2+
3+
# This composite action prepares a conda environment with a set of shared settings
4+
# that all NNPDF workflows should utilize.
5+
# see https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action
6+
7+
# Use it as a step of your workflow as:
8+
# - uses: ./.github/actions/install_conda_pip
9+
#
10+
# It is possible to modify the python version of the default environment with
11+
# with:
12+
# python-version: "3.12"
13+
#
14+
# Remember that these actions are only available after checking out the repository,
15+
# which should always be the first step!
16+
# - uses: actions/checkout@v4
217

318
inputs:
419
python-version:
@@ -16,7 +31,7 @@ runs:
1631
channels: https://packages.nnpdf.science/public,conda-forge
1732
show-channel-urls: true
1833
auto-update-conda: true
19-
activate-environment: test
34+
activate-environment: nnpdf_environment
2035
conda-remove-defaults: true
2136
- name: Add NETRC
2237
shell: bash -l {0}

.github/workflows/all_tests_nnpdf.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: All tests NNPDF
22

3+
# This workflow collects all tests for the NNPDF framework
4+
# the environment and installation steps are shared as they are using
5+
# the custom actions in .github/actions/
6+
37
on: [push]
48

59
env:
@@ -16,7 +20,7 @@ jobs:
1620
include:
1721
- os: ubuntu-latest
1822
CONDA_OS: linux-64
19-
fail-fast: false
23+
fail-fast: false # continue even if some jobs failed
2024
runs-on: ${{ matrix.os }}
2125
steps:
2226
- uses: actions/checkout@v4
@@ -46,7 +50,7 @@ jobs:
4650
runs-on: ${{ matrix.os }}
4751
steps:
4852
- uses: actions/checkout@v4
49-
with:
53+
with: # conda requires fetching the history of the repo to prepare the package name
5054
fetch-tags: true
5155
fetch-depth: 0
5256
- uses: ./.github/actions/prepare_environment

0 commit comments

Comments
 (0)