Skip to content

Commit 2ba4e5f

Browse files
authored
Reduce amount of testing in workflows (#691)
1 parent ec382f1 commit 2ba4e5f

File tree

2 files changed

+9
-32
lines changed

2 files changed

+9
-32
lines changed

.github/workflows/codeql.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ on:
55
branches: [main]
66
pull_request:
77
branches: [main]
8-
schedule:
9-
- cron: "57 5 * * 3" # M H d m w (Every Wednesday at 5:57 AM)
8+
workflow_dispatch:
109

1110
concurrency:
1211
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/tests.yaml

+8-30
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ jobs:
2626
with:
2727
python-version: ${{ matrix.python }}
2828
cache: pip
29-
- name: without optional dependencies
29+
- name: without optional dependencies and without pyyaml
3030
run: |
3131
pip install .[coverage]
32+
pip uninstall -y pyyaml types-PyYAML
3233
pytest --cov --cov-report=term --cov-report=xml --junit-xml=junit.xml
3334
mv coverage.xml coverage_py${{ matrix.python }}_bare.xml
3435
mv junit.xml junit_py${{ matrix.python }}_bare.xml
@@ -58,7 +59,7 @@ jobs:
5859
strategy:
5960
fail-fast: false
6061
matrix:
61-
python: [3.8, 3.9, "3.10", 3.11, 3.12, 3.13]
62+
python: [3.9, "3.10", 3.11, 3.12, 3.13]
6263
steps:
6364
- uses: actions/checkout@v4
6465
- uses: actions/setup-python@v5
@@ -73,7 +74,7 @@ jobs:
7374
strategy:
7475
fail-fast: false
7576
matrix:
76-
python: [3.8, "3.10", 3.12]
77+
python: ["3.10", 3.12]
7778
steps:
7879
- uses: actions/checkout@v4
7980
- uses: actions/setup-python@v5
@@ -127,29 +128,6 @@ jobs:
127128
name: junit_pydantic
128129
path: ./junit_py*
129130

130-
without-pyyaml:
131-
runs-on: ubuntu-latest
132-
steps:
133-
- uses: actions/checkout@v4
134-
- uses: actions/setup-python@v5
135-
with:
136-
python-version: "3.10"
137-
cache: pip
138-
- run: |
139-
pip install .[test,coverage,all]
140-
pip uninstall -y argcomplete omegaconf pyyaml reconplogger responses ruyaml types-PyYAML
141-
pytest --cov --cov-report=term --cov-report=xml --junit-xml=junit.xml
142-
mv coverage.xml coverage_without_pyyaml.xml
143-
mv junit.xml junit_without_pyyaml.xml
144-
- uses: actions/upload-artifact@v4
145-
with:
146-
name: coverage_without_pyyaml
147-
path: ./coverage_without_pyyaml.xml
148-
- uses: actions/upload-artifact@v4
149-
with:
150-
name: junit_without_pyyaml
151-
path: ./junit_without_pyyaml.xml
152-
153131
build-package:
154132
runs-on: ubuntu-latest
155133
steps:
@@ -208,7 +186,7 @@ jobs:
208186
- uses: actions/checkout@v4
209187
- uses: actions/setup-python@v5
210188
with:
211-
python-version: "3.10"
189+
python-version: "3.12"
212190
cache: pip
213191
- uses: actions/cache@v4
214192
with:
@@ -220,7 +198,7 @@ jobs:
220198
codecov:
221199
runs-on: ubuntu-latest
222200
environment: codecov
223-
needs: [linux, pydantic-v1, without-pyyaml]
201+
needs: [linux, pydantic-v1]
224202
steps:
225203
- uses: actions/checkout@v4
226204
- uses: actions/download-artifact@v4
@@ -243,7 +221,7 @@ jobs:
243221
if: |
244222
(github.event_name == 'push') ||
245223
(github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork)
246-
needs: [linux, pydantic-v1, without-pyyaml]
224+
needs: [linux, pydantic-v1]
247225
steps:
248226
- uses: actions/checkout@v4
249227
with:
@@ -278,7 +256,7 @@ jobs:
278256
pypi-publish:
279257
if: startsWith(github.ref, 'refs/tags/v')
280258
runs-on: ubuntu-latest
281-
needs: [linux, windows, macos, omegaconf, pydantic-v1, without-pyyaml, installed-package, doctest, mypy]
259+
needs: [linux, windows, macos, omegaconf, pydantic-v1, installed-package, doctest, mypy]
282260
environment:
283261
name: pypi
284262
url: https://pypi.org/p/jsonargparse

0 commit comments

Comments
 (0)