-
Notifications
You must be signed in to change notification settings - Fork 108
81 lines (69 loc) · 2.5 KB
/
test_everest_macos.yml
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: everest-macos-run-tests-build-docs
on:
pull_request:
workflow_dispatch:
push:
branches:
- main
tags: "*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
NO_PROJECT_RES: 1
UV_SYSTEM_PYTHON: 1
jobs:
tests:
if: github.ref_type == 'tag' # only build for mac when tags
name: "py-${{ matrix.python-version }}_${{ matrix.test_type }}_${{ matrix.os }}"
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.12']
os: ['macos-13', 'macos-14', 'macos-14-large']
# https://github.com/actions/runner-images/tree/main?tab=readme-ov-file#available-images
exclude:
- os: 'macos-14'
python-version: '3.8'
- os: 'macos-14-large'
python-version: '3.8'
- os: 'macos-13'
python-version: '3.12'
test_type: ['doc', 'test', 'integration-test', 'everest-models-test']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install HDF5 source files
if: ${{ runner.os == 'macOS' && (matrix.python-version == '3.8' || matrix.python-version == '3.9' )}}
run: brew install hdf5
- name: Install Everest and dependencies
run: |
uv pip install .[dev, everest]
- name: Run Tests
if: matrix.test_type == 'test'
run: |
python -m pytest tests/everest -n 4 -m "not ui_test and not integration_test and not fails_on_macos_github_workflow" --dist loadgroup
- name: Run Integration Tests
if: matrix.test_type == 'integration-test'
run: |
python -m pytest tests/everest -n 4 -m "integration_test and not fails_on_macos_github_workflow" --dist loadgroup
- name: Build Documentation
if: matrix.test_type == 'doc'
run: |
uv pip install git+https://github.com/equinor/everest-models.git
mkdir tmp
sphinx-build -n -v -E -W ./docs/everest ./tmp/everest_docs
- name: Run tests requiring everest-models
if: matrix.test_type == 'everest-models-test'
run: |
uv pip install git+https://github.com/equinor/everest-models.git
python -m pytest tests/everest -n 4 -m everest_models_test --dist loadgroup