-
Notifications
You must be signed in to change notification settings - Fork 2
81 lines (68 loc) · 2.54 KB
/
Copy pathfull-tests.yml
File metadata and controls
81 lines (68 loc) · 2.54 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
70
71
72
73
74
75
76
77
78
79
80
81
name: Full Test Suite
on:
workflow_dispatch:
inputs:
test_type:
description: 'Type of test to run'
required: true
default: 'integration'
type: choice
options:
- integration
- e2e
- performance
- all
jobs:
comprehensive-test:
name: Comprehensive Tests
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout source
uses: actions/checkout@v7.0.0
with:
submodules: recursive
- name: Setup pixi
uses: prefix-dev/setup-pixi@v0.10.0
with:
pixi-version: latest
- name: Refresh CMIP7 vocabularies to latest upstream
run: |
git -C src/access_moppy/vocabularies/cmip7-cmor-tables fetch origin main
git -C src/access_moppy/vocabularies/cmip7-cmor-tables checkout --detach FETCH_HEAD
- name: Create default config file
run: |
mkdir -p ~/.moppy
cat <<EOF > ~/.moppy/user.yml
creator_name: "CI Bot"
organisation: "ACCESS-NRI"
creator_email: "ci@example.com"
creator_url: "https://example.com"
EOF
- name: List installed packages
run: pixi list -e test
- name: Run integration tests
if: github.event.inputs.test_type == 'integration' || github.event.inputs.test_type == 'all'
run: pixi run -e test pytest tests/integration -v --tb=short
- name: Run end-to-end tests
if: github.event.inputs.test_type == 'e2e' || github.event.inputs.test_type == 'all'
run: pixi run -e test pytest tests/e2e -v --tb=short
- name: Run performance tests
if: github.event.inputs.test_type == 'performance' || github.event.inputs.test_type == 'all'
run: pixi run -e test pytest tests/performance -v --tb=short
- name: Generate coverage report (if running all tests)
if: github.event.inputs.test_type == 'all'
run: pixi run -e test pytest tests --cov=access_moppy --cov-config=.coveragerc --cov-report=xml --cov-report=html
- name: Upload code coverage (all tests)
if: github.event.inputs.test_type == 'all'
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.codecov_token }}
files: ./coverage.xml
flags: full-tests
- name: Upload coverage artifacts
if: github.event.inputs.test_type == 'all'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: coverage-report
path: htmlcov/