@@ -9,6 +9,8 @@ concurrency:
99 group : ${{ github.workflow }}-${{ github.ref }}
1010 cancel-in-progress : true
1111
12+ permissions : {}
13+
1214jobs :
1315 ci :
1416 name : tests
@@ -21,106 +23,12 @@ jobs:
2123 steps :
2224 - name : clone the repository
2325 uses : actions/checkout@v6
24- - name : setup python
25- uses : actions/setup-python@v6
26+ with :
27+ persist-credentials : false
28+ - name : setup environment
29+ uses : astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # 7.1.6
2630 with :
2731 python-version : " ${{ matrix.python-version }}"
28- - name : upgrade pip
29- run : |
30- python -m pip install --upgrade pip
31- - name : install dependencies
32- run : |
33- python -m pip install -r requirements.txt
34- python -m pip install .
35- python -m pip install pytest
3632 - name : run tests
3733 run : |
38- python -m pytest -rf
39-
40- e2e :
41- name : end-to-end
42- runs-on : [ubuntu-latest]
43-
44- strategy :
45- fail-fast : false
46- matrix :
47- envs :
48- - " envs/env1.yaml"
49- - " envs/env2.yaml"
50- - |
51- envs/env1.yaml
52- envs/env2.yaml
53- expected-failure : ["false"]
54- policy-file : ["policy.yaml"]
55- include :
56- - envs : |
57- envs/failing-env1.yaml
58- policy-file: "policy.yaml"
59- expected-failure: "true"
60- - envs : |
61- envs/env1.yaml
62- envs/failing-env1.yaml
63- policy-file: "policy.yaml"
64- expected-failure: "true"
65- - envs : " envs/env1.yaml"
66- policy-file : " policy_no_extra_options.yaml"
67- expected-failure : " false"
68- - envs : " pixi:env1"
69- manifest-path : " envs/pixi.toml"
70- policy-file : " policy.yaml"
71- expected-failure : " false"
72- - envs : |
73- pixi:env1
74- pixi:env2
75- manifest-path: "envs/pixi.toml"
76- policy-file: "policy.yaml"
77- expected-failure: "false"
78- - envs : |
79- pixi:env1
80- conda:envs/env2.yaml
81- manifest-path: "envs/pixi.toml"
82- policy-file: "policy.yaml"
83- expected-failure: "false"
84- - envs : " pixi:failing-env"
85- manifest-path : " envs/pixi.toml"
86- policy-file : " policy.yaml"
87- expected-failure : " true"
88-
89- steps :
90- - name : clone the repository
91- uses : actions/checkout@v6
92- - name : run action
93- uses : ./
94- id : action-run
95- continue-on-error : true
96- with :
97- policy : ${{ matrix.policy-file }}
98- environments : ${{ matrix.envs }}
99- today : 2024-12-20
100- manifest-path : ${{ matrix.manifest-path }}
101- - name : detect outcome
102- if : always()
103- shell : bash -l {0}
104- run : |
105- if [[ "${{ steps.action-run.outcome }}" == "success" && ${{ matrix.expected-failure }} == "true" ]]; then
106- # unexpected pass
107- echo "workflow xpassed"
108- export STATUS=1
109- elif [[ "${{ steps.action-run.outcome }}" == "failure" && ${{ matrix.expected-failure }} == "false" ]]; then
110- # unexpected failure
111- echo "workflow failed"
112- export STATUS=2
113- elif [[ "${{ steps.action-run.outcome }}" == "success" && ${{ matrix.expected-failure }} == "false" ]]; then
114- # normal pass
115- echo "workflow passed"
116- export STATUS=0
117- elif [[ "${{ steps.action-run.outcome }}" == "failure" && ${{ matrix.expected-failure }} == "true" ]]; then
118- # expected failure
119- echo "workflow xfailed"
120- export STATUS=0
121- else
122- # cancelled
123- echo "workflow cancelled"
124- export STATUS=3
125- fi
126- exit $STATUS
34+ uv run -m pytest -rf --cov=minimum_versions
0 commit comments