-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (57 loc) · 1.99 KB
/
Copy pathResInsightWithCache.yml
File metadata and controls
69 lines (57 loc) · 1.99 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: Build and Test
on:
push:
pull_request:
concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install rips pytest pytest-cov "ruff>=0.16" taskmaestro==0.1.0
- name: Ruff check
run: ruff check .
- name: Ruff format check
run: ruff format --check .
- name: Install Linux runtime dependencies
run: |
sudo apt-get update --option="APT::Acquire::Retries=3"
sudo apt-get install --option="APT::Acquire::Retries=3" -y \
libxkbcommon-x11-0 libgl1 libglu1-mesa libglfw3 libegl1 \
libxcb-cursor0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 \
libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-xkb1 \
xvfb
- name: Download ResInsight nightly build
run: |
curl -L -o ResInsight-nightly.zip \
"https://nightly.link/OPM/ResInsight/workflows/ResInsightWithCache/dev/ResInsight-Ubuntu%2024.04%20gcc.zip"
unzip -q ResInsight-nightly.zip -d resinsight-nightly
chmod +x resinsight-nightly/bin/ResInsight
- name: Run tests
env:
RESINSIGHT_EXECUTABLE: ${{ github.workspace }}/resinsight-nightly/bin/ResInsight
PYTHONPATH: ${{ github.workspace }}
run: >
xvfb-run --auto-servernum
pytest tests/ -v
--cov=taskmaestro_resinsight
--cov-report=term
--cov-report=xml
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-xml
path: coverage.xml