Skip to content

Commit 6356e1f

Browse files
Merge pull request #913 from NeurodataWithoutBorders/e2e
Split base tests from end to end, regenerate screenshots
2 parents baa7e68 + e698337 commit 6356e1f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+232
-56
lines changed

.github/workflows/daily_tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ jobs:
2020
uses: ./.github/workflows/testing_dev_with_live_services.yml
2121
secrets:
2222
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
23+
24+
E2ELiveServices:
25+
uses: ./.github/workflows/testing_dev_e2e_with_live_services.yml
26+
secrets:
27+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2328
DANDI_STAGING_API_KEY: ${{ secrets.DANDI_STAGING_API_KEY }}
2429

2530
BuildTests:

.github/workflows/deploy_tests_on_pull_request.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ jobs:
1818
uses: ./.github/workflows/testing_dev_with_live_services.yml
1919
secrets:
2020
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
21+
22+
E2ELiveServices:
23+
uses: ./.github/workflows/testing_dev_e2e_with_live_services.yml
24+
secrets:
25+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2126
DANDI_STAGING_API_KEY: ${{ secrets.DANDI_STAGING_API_KEY }}
2227

2328
BuildTests:

.github/workflows/testing_dev.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
- os: macos-13 # Mac x64 runner
3030
label: environments/environment-MAC-intel.yml
3131

32-
# - os: windows-latest
33-
# label: environments/environment-Windows.yml
32+
- os: windows-latest
33+
label: environments/environment-Windows.yml
3434

3535
steps:
3636
- uses: actions/checkout@v4
@@ -83,16 +83,6 @@ jobs:
8383
name: Run tests with xvfb
8484
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test:coverage
8585

86-
- name: Archive E2E Test Screenshots
87-
if: always()
88-
uses: actions/upload-artifact@v4
89-
with:
90-
name: test-screenshots-${{ matrix.os }}
91-
path: docs/assets/tutorials
92-
retention-days: 1
93-
overwrite: true
94-
95-
9686
- name: Upload coverage reports to Codecov
9787
uses: codecov/codecov-action@v4
9888
env:
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: End-to-end tests with live services
2+
on:
3+
workflow_call:
4+
secrets:
5+
CODECOV_TOKEN:
6+
required: true
7+
DANDI_STAGING_API_KEY:
8+
required: true
9+
10+
jobs:
11+
12+
run:
13+
# Will read on PR dashboard as 'Deploy / E2ELiveServices / {os}'
14+
# Action dashboard identified by 'End-to-end tests with live services'
15+
# Requirement settings identified as 'E2ELiveServices / {os}'
16+
name: ${{ matrix.os }}
17+
runs-on: ${{ matrix.os }}
18+
defaults:
19+
run:
20+
shell: bash -l {0}
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
include:
25+
- os: ubuntu-latest
26+
label: environments/environment-Linux.yml
27+
28+
- os: macos-latest # Mac arm64 runner
29+
label: environments/environment-MAC-apple-silicon.yml
30+
31+
- os: macos-13 # Mac x64 runner
32+
label: environments/environment-MAC-intel.yml
33+
34+
- os: windows-latest
35+
label: environments/environment-Windows.yml
36+
37+
steps:
38+
- uses: actions/checkout@v4
39+
- run: git fetch --prune --unshallow --tags
40+
41+
# see https://github.com/conda-incubator/setup-miniconda#caching-environments
42+
- name: Setup Mambaforge
43+
uses: conda-incubator/setup-miniconda@v3
44+
with:
45+
miniforge-variant: Mambaforge
46+
miniforge-version: latest
47+
activate-environment: nwb-guide
48+
use-mamba: true
49+
50+
- name: Set cache date
51+
id: get-date
52+
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
53+
shell: bash
54+
55+
- name: Cache Conda env
56+
uses: actions/cache@v4
57+
with:
58+
path: ${{ env.CONDA }}/envs
59+
key: conda-${{ runner.os }}-${{ runner.arch }}-${{steps.get-date.outputs.today }}-${{ hashFiles(matrix.label) }}-${{ env.CACHE_NUMBER }}
60+
id: cache
61+
62+
- if: steps.cache.outputs.cache-hit != 'true'
63+
name: Create and activate environment
64+
run: mamba env update -n nwb-guide -f ${{ matrix.label }}
65+
66+
- name: Use Node.js 20
67+
uses: actions/setup-node@v4
68+
with:
69+
node-version: 20
70+
71+
- name: Install GUIDE
72+
run: npm ci --verbose
73+
74+
- name: Install testing dependencies
75+
run: pip install pytest pytest-cov
76+
77+
- name: Manually remove matplotlib
78+
run: pip uninstall matplotlib --yes
79+
80+
- name: Create env file
81+
run: |
82+
touch .env
83+
echo DANDI_STAGING_API_KEY=${{ secrets.DANDI_STAGING_API_KEY }} >> .env
84+
85+
- if: matrix.os != 'ubuntu-latest'
86+
name: Run tests
87+
run: npm run coverage:tutorial
88+
89+
- if: matrix.os == 'ubuntu-latest'
90+
name: Run tests with xvfb
91+
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run coverage:tutorial
92+
93+
- name: Archive E2E Test Screenshots
94+
uses: actions/upload-artifact@v4
95+
with:
96+
name: test-screenshots-${{ matrix.os }}
97+
path: docs/assets/tutorials
98+
retention-days: 1
99+
overwrite: true
100+
101+
- name: Upload coverage reports to Codecov
102+
uses: codecov/codecov-action@v4
103+
env:
104+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
105+
with:
106+
fail_ci_if_error: true

.github/workflows/testing_dev_with_live_services.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
secrets:
55
CODECOV_TOKEN:
66
required: true
7-
DANDI_STAGING_API_KEY:
8-
required: true
97

108
jobs:
119

@@ -31,8 +29,8 @@ jobs:
3129
- os: macos-13 # Mac x64 runner
3230
label: environments/environment-MAC-intel.yml
3331

34-
# - os: windows-latest
35-
# label: environments/environment-Windows.yml
32+
- os: windows-latest
33+
label: environments/environment-Windows.yml
3634

3735
steps:
3836
- uses: actions/checkout@v4
@@ -77,11 +75,6 @@ jobs:
7775
- name: Manually remove matplotlib
7876
run: pip uninstall matplotlib --yes
7977

80-
- name: Create env file
81-
run: |
82-
touch .env
83-
echo DANDI_STAGING_API_KEY=${{ secrets.DANDI_STAGING_API_KEY }} >> .env
84-
8578
- if: matrix.os != 'ubuntu-latest'
8679
name: Run tests
8780
run: npm run coverage:app
4.71 KB
Loading
104 Bytes
Loading
151 Bytes
Loading
-2.27 KB
Loading
-2.39 KB
Loading

0 commit comments

Comments
 (0)