-
Notifications
You must be signed in to change notification settings - Fork 2
118 lines (114 loc) · 3.95 KB
/
tests.yaml
File metadata and controls
118 lines (114 loc) · 3.95 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: tests
run-name: Python Tests
on:
workflow_call:
push:
branches:
- "**"
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: 'Checkout repository'
uses: actions/checkout@v3
with:
submodules: true
- name: 'Setup Python'
uses: actions/setup-python@v5
with:
python-version: '3.12.3'
- name: Ensure pip is installed
run: python -m ensurepip --upgrade
- name: Upgrade pip and setuptools
run: |
python -m pip install --upgrade pip setuptools
- name: 'Install dependencies'
run: python -m pip install -r requirements.txt
run-unittests:
needs: setup
runs-on: ubuntu-latest
steps:
- name: 'Run unit tests'
run: tox -e docs
- name: 'Test engine/basic_camera_model/main.py'
run: python engine/basic_camera_model/main.py
- name: 'Test engine/extended_camera_model/main.py'
run: python engine/extended_camera_model/main.py
smoke-tests-linux:
needs: setup
strategy:
fail-fast: false
matrix:
image: ['ubuntu:latest', 'ubuntu:20.04', 'ubuntu:22.04', 'debian:latest', 'archlinux:latest']
python_version: ['3.12']
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
env:
TZ: Europe/Berlin
steps:
- name: 'Install git (Ubuntu, Debian)'
if: ${{ contains(fromJSON('["ubuntu:latest", "ubuntu:20.04", "ubuntu:22.04", "debian:latest"]'), matrix.image) }}
run: apt-get update && apt-get install -y git
- name: 'Install git (Arch)'
if: ${{ contains('archlinux:latest', matrix.image) }}
run: pacman -Syu --noconfirm git
- name: 'Checkout repository'
uses: actions/checkout@v3
with:
submodules: true
- name: 'Setup timezone'
run: ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
- name: 'Install OpenGL dependencies (Ubuntu/Debian)'
if: ${{ contains(matrix.image, 'ubuntu') || contains(matrix.image, 'debian') }}
run: apt-get install -y libgl1-mesa-glx
- name: 'Install OpenGL dependencies (Arch)'
if: ${{ contains(matrix.image, 'archlinux') }}
run: pacman -Syu --noconfirm libglvnd
- name: 'Setup Python'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Ensure pip is installed
run: python -m ensurepip --upgrade
- name: Upgrade pip and setuptools
run: |
python -m pip install --upgrade pip setuptools
- name: 'Install dependencies'
run: python -m pip install -r requirements.txt
- name: 'Run unit tests'
run: tox -e docs
- name: 'Test engine/basic_camera_model/main.py'
run: python engine/basic_camera_model/main.py
- name: 'Test engine/extended_camera_model/main.py'
run: python engine/extended_camera_model/main.py
smoke-tests-macos:
needs: setup
strategy:
fail-fast: false
matrix:
macos_version: ['macos-latest', 'macos-13']
python_version: ['3.12']
runs-on: ${{ matrix.macos_version }}
steps:
- name: 'Checkout repository'
uses: actions/checkout@v3
with:
submodules: true
- name: 'Setup Python'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Ensure pip is installed
run: python -m ensurepip --upgrade
- name: Upgrade pip and setuptools
run: |
python -m pip install --upgrade pip setuptools
- name: 'Install dependencies'
run: python -m pip install -r requirements.txt
- name: 'Run unit tests'
run: tox -e docs
- name: 'Test engine/basic_camera_model/main.py'
run: python engine/basic_camera_model/main.py
- name: 'Test engine/extended_camera_model/main.py'
run: python engine/extended_camera_model/main.py