forked from equinor/ert
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (64 loc) · 2.08 KB
/
test_ert.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
on:
workflow_call:
inputs:
os:
type: string
python-version:
type: string
test-type:
type: string
jobs:
tests-ert:
name: Run ert tests
timeout-minutes: 30
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: './.github/actions/install_dependencies'
if: inputs.test-type == 'gui-test'
with:
os: ${{ inputs.os }}
- uses: actions/setup-python@v4
id: setup_python
with:
python-version: ${{ inputs.python-version }}
cache: "pip"
cache-dependency-path: |
setup.py
pyproject.toml
dev-requirements.txt
- name: Get wheels
uses: actions/download-artifact@v3
with:
name: ${{ inputs.os }} Python ${{ inputs.python-version }} wheel
- name: Install wheel
run: |
find . -name "*.whl" -exec pip install {} \;
- name: Install dependencies
run: pip install -r dev-requirements.txt
- name: Test GUI
if: inputs.test-type == 'gui-test'
env:
DISPLAY: ':99.0'
run: |
ci/github/start_herbstluftwm.sh &
sleep 5
pytest tests -sv --hypothesis-profile=ci -m "requires_window_manager" --benchmark-disable
- name: Unit Test
if: inputs.test-type == 'unit-tests'
run: |
pytest tests -n4 --show-capture=stderr -sv --hypothesis-profile=ci -m "not integration_test and not requires_window_manager" --benchmark-disable
- name: Integration Test
if: inputs.test-type == 'integration-tests'
run: |
pytest tests -n4 --show-capture=stderr -sv --hypothesis-profile=ci -m "integration_test and not requires_window_manager" --benchmark-disable
- name: Test for a clean repository
run: |
# Run this before the 'Test CLI' entry below, which produces a few files that are accepted for now. Exclude the wheel.
git status --porcelain | sed '/ert.*.whl$/d'
test -z "$(git status --porcelain | sed '/ert.*.whl$/d')"
- name: Test CLI
run: |
ert --help