@@ -12,75 +12,50 @@ concurrency:
1212 group : ${{ github.workflow }}-${{ github.ref }}
1313 cancel-in-progress : true
1414
15- defaults :
16- run :
17- shell : bash -el {0}
18-
1915jobs :
2016
2117 shellcheck :
2218 runs-on : ubuntu-latest
23- if : github.event_name != 'push' || github.repository == 'DIRACGrid/diracx'
24- timeout-minutes : 30
25-
2619 steps :
27- - uses : actions/checkout@v4
28- - name : Run shellcheck
29- # Excluded codes related to sourcing files
30- # SC1090: Can't follow non-constant source
31- # SC1091: Not following sourced file
32- run : |
33- find -name '*.sh' -print0 | xargs -0 -n1 shellcheck --exclude=SC1090,SC1091 --external-source
20+ - name : Checkout code
21+ uses : actions/checkout@v4
22+ - uses : prefix-dev/setup-pixi@v0.8.3
23+ with :
24+ environments : shellcheck
25+ - name : Run shellcheck
26+ run : pixi run shellcheck
3427
3528 unittest :
3629 name : Unit test - ${{ matrix.package }}
3730 runs-on : ubuntu-latest
3831 strategy :
3932 fail-fast : false
4033 matrix :
41- include :
42- - package : " ./ diracx-core"
43- dependencies : " ./ diracx-testing "
44- - package : " ./ diracx-db "
45- dependencies : " ./diracx-testing ./ diracx-core "
46- - package : " ./ diracx-logic "
47- dependencies : " ./diracx-core ./ diracx-db "
48- - package : " ./ diracx-routers "
49- dependencies : " ./diracx-testing ./diracx -core ./diracx-db ./diracx-logic "
50- - package : " ./diracx-client "
51- dependencies : " ./diracx-testing ./diracx-core "
52- - package : " ./diracx-api "
53- dependencies : " ./diracx-testing ./diracx-core ./diracx- client"
54- - package : " ./diracx-cli "
55- dependencies : " ./diracx-testing ./diracx-core ./diracx-client ./diracx-api "
34+ package :
35+ - diracx-core
36+ - diracx-db
37+ - diracx-logic
38+ - diracx-routers
39+ - diracx-client
40+ - diracx-api
41+ - diracx-cli
42+ - gubbins -core
43+ - gubbins-db
44+ - gubbins-logic
45+ - gubbins-routers
46+ - gubbins- client
47+ - gubbins-api
48+ - gubbins-cli
5649 steps :
5750 - name : Checkout code
5851 uses : actions/checkout@v4
59- - uses : mamba-org /setup-micromamba@v2
52+ - uses : prefix-dev /setup-pixi@v0.8.3
6053 with :
61- # TODO: Use a conda environment file used for the diracx/base container image
62- environment-name : test-env
63- environment-file : environment.yml
64- init-shell : bash
65- post-cleanup : ' all'
66- - name : Set up environment
67- run : |
68- pip install pytest-github-actions-annotate-failures
69- # Note: DIRAC will install pretty much everything
70- # from diracx so installing just the dependency may
71- # be a bit useless
72- pip install git+https://github.com/DIRACGrid/DIRAC.git@integration
73- pip install ${{ matrix.dependencies }}
54+ environments : ${{ matrix.package }}
7455 - name : Run pytest
75- if : ${{ matrix.package != './diracx-logic' }}
76- run : |
77- cd ${{ matrix.package }}
78- pip install .[testing]
79- pytest --cov-report=xml:coverage.xml --junitxml=report.xml
80- - name : Run mypy
81- run : |
82- pip install mypy ${{ matrix.package }}[types]
83- mypy ${{ matrix.package }}/src
56+ env :
57+ EXTRA_PYTEST_ARGS : --cov-report=xml:coverage.xml --junitxml=report.xml
58+ run : pixi run unit-${{ matrix.package }}
8459 - name : Upload coverage report
8560 uses : codecov/codecov-action@v5.4.2
8661
8964 steps :
9065 - name : Checkout code
9166 uses : actions/checkout@v4
92- - uses : mamba-org /setup-micromamba@v2
67+ - uses : prefix-dev /setup-pixi@v0.8.3
9368 with :
94- environment-file : environment.yml
95- init-shell : bash
96- post-cleanup : ' all'
97- - name : Set up environment
98- run : |
99- pip install pytest-github-actions-annotate-failures
100- pip install git+https://github.com/DIRACGrid/DIRAC.git@integration
101- pip install ./diracx-core/[testing] ./diracx-api/[testing] ./diracx-cli/[testing] ./diracx-client/[testing] ./diracx-routers/[testing] ./diracx-logic/[testing] ./diracx-db/[testing] ./diracx-testing/
69+ environments : default
10270 - name : Start demo
10371 run : |
10472 git clone https://github.com/DIRACGrid/diracx-charts.git ../diracx-charts
12391 fi
12492 - name : Run pytest
12593 run : |
126- pytest --demo-dir=../diracx-charts/ --cov-report=xml:coverage-pytest.xml --junitxml=report.xml
94+ pixi run pytest-diracx --demo-dir=../diracx-charts/ --cov-report=xml:coverage-pytest.xml --junitxml=report.xml
12795 - name : Collect demo coverage
12896 run : |
12997 DIRACX_DEMO_DIR=$PWD/../diracx-charts/.demo
@@ -155,22 +123,15 @@ jobs:
155123
156124 client-generation :
157125 runs-on : ubuntu-latest
126+ strategy :
127+ fail-fast : false
128+ matrix :
129+ package : [diracx, gubbins]
158130 steps :
159131 - name : Checkout code
160132 uses : actions/checkout@v4
161- - uses : mamba-org /setup-micromamba@v2
133+ - uses : prefix-dev /setup-pixi@v0.8.3
162134 with :
163- environment-file : environment.yml
164- init-shell : bash
165- post-cleanup : ' all'
166- - name : Set up environment
167- run : |
168- micromamba install -c conda-forge nodejs pre-commit
169- pip install git+https://github.com/DIRACGrid/DIRAC.git@integration
170- pip install ./diracx-core/ ./diracx-api/ ./diracx-cli/ -e ./diracx-client/[testing] ./diracx-routers/[testing] ./diracx-logic/[testing] ./diracx-db/ ./diracx-testing/
171- npm install -g autorest
135+ environments : ${{ matrix.package }}-generate-client
172136 - name : Run autorest
173- run : |
174- autorest --python --help
175- $HOME/.autorest/\@autorest_python\@*/node_modules/\@autorest/python/venv/bin/python -m pip install --upgrade setuptools
176- pytest --no-cov --regenerate-client diracx-client/tests/test_regenerate.py
137+ run : pixi run -e ${{ matrix.package }}-generate-client generate-client
0 commit comments