Repository navigation
69 lines (60 loc) · 2.57 KB
/
Copy pathtest-cloud-api.yml
File metadata and controls
69 lines (60 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Test Cloud API
on:
# Run once a day
schedule:
- cron: '0 0 * * *'
# Allow manual runs from the Actions tab
workflow_dispatch:
# Run on pull requests that touch the pyramid loader, its cloud
# fixture, or the workflow itself. Kept path-filtered so a PR that
# only edits, say, gene-pyramid code does not burn cloud API calls
# and bill the two shared test accounts on every push.
pull_request:
paths:
- 'src/ndi/pyramid/**'
- 'tests/test_pyramid_loader_integration.py'
- 'tests/fixtures/lightsheet_cloud_fixture.json'
- 'tests/test_cloud_*.py'
- '.github/workflows/test-cloud-api.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
cloud-tests:
name: Cloud API (User ${{ matrix.user }}, ${{ matrix.environment }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
user: [1, 2]
environment: [prod, dev]
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install with ndi_install.py
run: |
python -m pip install --upgrade pip
python ndi_install.py --dev --no-validate --verbose
- name: Run cloud API tests
env:
NDI_CLOUD_USERNAME: ${{ matrix.user == 1 && secrets.TEST_USER_1_USERNAME || secrets.TEST_USER_2_USERNAME }}
NDI_CLOUD_PASSWORD: ${{ matrix.user == 1 && secrets.TEST_USER_1_PASSWORD || secrets.TEST_USER_2_PASSWORD }}
CLOUD_API_ENVIRONMENT: ${{ matrix.environment }}
# The MATLAB BYOL tests call DELETE /users/me/matlab-license, so
# tests/_matlab_license_guard.py refuses to run unless this is set
# explicitly. Neither test account has a registered license, so
# the destructive tests run end-to-end and clean up after themselves.
NDI_CLOUD_TEST_USER_HAS_MATLAB_LICENSE: "false"
run: |
# All live cloud test files, not just test_cloud_live.py -- the
# others were previously exercised only by ci.yml, so they had no
# coverage on days when nobody opened a PR.
#
# test_pyramid_loader_integration.py points at the permanent
# lightsheet blob fixture (see tests/fixtures/lightsheet_cloud_fixture.json,
# built by build-lightsheet-fixture.yml). It runs under the
# same account-and-env matrix as the rest of the cloud tests.
pytest tests/test_cloud_*.py tests/test_pyramid_loader_integration.py -v --tb=short