forked from equinor/ert
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (80 loc) · 2.81 KB
/
Copy pathtest_ert_with_site_config.yml
File metadata and controls
98 lines (80 loc) · 2.81 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Run ERT tests against dummy site config
permissions:
contents: read
on:
push:
branches:
- main
- 'version-**'
workflow_call:
workflow_dispatch:
jobs:
test-against-lsf:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest']
test-type: [ 'gui-tests', 'rapid-tests' ]
python-version: ["3.12"]
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
- uses: ./.github/actions/install_dependencies_qt
with:
os: ${{ matrix.os }}
- name: Install uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
enable-cache: true
prune-cache: false
python-version: ${{ matrix.python-version }}
- name: Install ERT + dummy plugin package that sets site config
run: |
set -euo pipefail
# Create package structure
mkdir -p dummy_site_config/dummy_plugin
# --- pyproject.toml ---
cat > dummy_site_config/pyproject.toml <<'END_OF_FILE'
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "dummy-site-configuration"
version = "0.1.0"
description = "Dummy ERT plugin for testing"
requires-python = ">=3.12"
[project.entry-points.ert]
dummy_site_config = "dummy_plugin"
END_OF_FILE
# --- __init__.py ---
cat > dummy_site_config/dummy_plugin/__init__.py <<'END_OF_FILE'
from ert import plugin
from ert.plugins import ErtRuntimePlugins
from ert.config.queue_config import LsfQueueOptions
@plugin(name="fmu-site-configuration")
def site_configurations():
return ErtRuntimePlugins(
queue_options=LsfQueueOptions(
lsf_resource="select[cs && x86_64Linux]",
lsf_queue="mr",
max_running=10000,
submit_sleep=1,
realization_memory=10737418240
),
)
END_OF_FILE
# Install the dummy package
uv sync --group dev
uv pip install ./dummy_site_config
- name: Rapid tests
if: matrix.test-type == 'rapid-tests'
run: |
uv run just rapid-tests
- name: GUI screenshot tests
if: matrix.test-type == 'gui-tests'
run: |
uv run pytest tests/ert/ui_tests/gui/test_docs_screenshots.py