Skip to content

Commit c153f2e

Browse files
committed
Update test workflow
1 parent 171ff7c commit c153f2e

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

.github/workflows/test_dedalus3.yml renamed to .github/workflows/dedalus_test.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,22 @@
22
# https://dev.to/epassaro/caching-anaconda-environments-in-github-actions-5hde
33
# https://github.com/epassaro/cache-conda-envs
44

5-
name: test_dedalus3
5+
name: dedalus test
66
on:
77
workflow_dispatch:
88
env:
99
CACHE_NUMBER: 0 # increase to reset cache manually
1010
jobs:
11-
build:
11+
test:
12+
name: Test workflow (${{ matrix.os }})
13+
runs-on: ${{ matrix.os }}
1214
strategy:
1315
matrix:
1416
include:
1517
- os: ubuntu-latest
16-
label: ubuntu-latest
1718
prefix: /usr/share/miniconda3/envs/dedalus3
18-
- os: macos-latest
19-
label: macos-latest
20-
prefix: /Users/runner/miniconda3/envs/dedalus3
21-
name: ${{ matrix.label }}
22-
runs-on: ${{ matrix.os }}
19+
# - os: macos-latest
20+
# prefix: /Users/runner/miniconda3/envs/dedalus3
2321
steps:
2422
- name: Setup miniforge
2523
uses: conda-incubator/setup-miniconda@v2
@@ -33,9 +31,9 @@ jobs:
3331
uses: actions/cache@v2
3432
with:
3533
path: ${{ matrix.prefix }}
36-
key: ${{ matrix.label }}-stack-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
34+
key: ${{ matrix.os }}-stack-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
3735
id: cache
38-
- name: Run conda installation (stack cache miss)
36+
- name: Run conda installation (only on cache miss)
3937
if: steps.cache.outputs.cache-hit != 'true'
4038
shell: bash -l {0}
4139
run: |
@@ -47,11 +45,21 @@ jobs:
4745
shell: bash -l {0}
4846
run: |
4947
conda activate dedalus3
50-
pip uninstall -y dedalus3
48+
pip uninstall -y dedalus
5149
pip install --no-cache .
5250
- name: Test Dedalus
5351
shell: bash -l {0}
5452
run: |
5553
conda activate dedalus3
56-
cd ~
57-
python3 -m dedalus test
54+
# Move out of repository to run tests
55+
cd $HOME
56+
python3 -m dedalus test --report
57+
# Copy report back to repository for test-reporter
58+
cp dedalus-test-junit.xml $GITHUB_WORKSPACE
59+
- name: Report test results
60+
uses: dorny/test-reporter@v1
61+
if: success() || failure()
62+
with:
63+
name: Test report (${{ matrix.os }})
64+
path: dedalus-test-junit.xml
65+
reporter: java-junit

0 commit comments

Comments
 (0)