-
Notifications
You must be signed in to change notification settings - Fork 139
92 lines (75 loc) · 2.58 KB
/
Copy pathtest_ert_with_site_config.yml
File metadata and controls
92 lines (75 loc) · 2.58 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
name: Run ERT tests against dummy site config
permissions:
contents: read
on:
push:
branches:
- main
- 'version-**'
workflow_call:
workflow_dispatch:
jobs:
test-against-lsf:
timeout-minutes: 15
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest']
python-version: ["3.14"]
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.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@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.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
run: |
uv run just rapid-tests