Skip to content

Commit 77394f8

Browse files
committed
add a separate workflow to test langs in parallel
1 parent 353977a commit 77394f8

File tree

2 files changed

+51
-14
lines changed

2 files changed

+51
-14
lines changed

.github/workflows/build-test-ci.yml

-14
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,12 @@ jobs:
3232
with:
3333
python-version: ${{ matrix.python-version }}
3434

35-
- uses: conda-incubator/setup-miniconda@v2
36-
with:
37-
auto-update-conda: true
38-
python-version: ${{ matrix.python-version }}
39-
mamba-version: "*"
40-
channels: conda-forge
41-
channel-priority: true
42-
4335
- name: Install dependencies
4436
run: python -m pip install nox tomli
4537

46-
- name: Install compilers
47-
run: mamba install c-compiler cxx-compiler fortran-compiler cmake
48-
4938
- name: Run the tests
5039
run: nox --session test test-cli --python ${{ matrix.python-version }} --verbose
5140

52-
- name: Run the language tests
53-
run: nox --non-interactive --error-on-missing-interpreter --session test-langs --python ${{ matrix.python-version }} --verbose
54-
5541
- name: Coveralls
5642
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9'
5743
uses: AndreMiras/coveralls-python-action@v20201129

.github/workflows/test-langs.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build/Test CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build-and-test:
7+
# We want to run on external PRs, but not on our own internal PRs as they'll be run
8+
# by the push to the branch. Without this if check, checks are duplicated since
9+
# internal PRs match both the push and pull_request events.
10+
if:
11+
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
12+
github.repository
13+
14+
runs-on: ${{ matrix.os }}
15+
16+
defaults:
17+
run:
18+
shell: bash -l {0}
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
os: [ubuntu-latest, macos-latest]
24+
python-version: ["3.10", "3.11", "3.12"]
25+
language: ["c", "cxx", "python", "fortran"]
26+
27+
steps:
28+
- uses: actions/checkout@v3
29+
with:
30+
submodules: true
31+
32+
- uses: conda-incubator/setup-miniconda@v2
33+
with:
34+
auto-update-conda: true
35+
python-version: ${{ matrix.python-version }}
36+
mamba-version: "*"
37+
channels: conda-forge
38+
channel-priority: true
39+
40+
- name: Install dependencies
41+
run: python -m pip install nox tomli
42+
43+
- name: Install compilers
44+
run: mamba install c-compiler cxx-compiler fortran-compiler cmake
45+
46+
- name: Run the language tests
47+
run: nox -s "test-langs-${{ matrix.python-version }}(lang='${{ matrix.language }}')" --python ${{ matrix.python-version }} --verbose
48+
49+
- name: Coveralls
50+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9'
51+
uses: AndreMiras/coveralls-python-action@v20201129

0 commit comments

Comments
 (0)