-
Notifications
You must be signed in to change notification settings - Fork 10
60 lines (45 loc) · 1.5 KB
/
pytest.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
name: pytest
on:
pull_request:
branches:
- main
types: [closed]
workflow_dispatch: # used to allow manual triggering
jobs:
test:
runs-on: ubuntu-latest
if: >
github.event.pull_request.merged == true ||
github.event_name == 'workflow_dispatch'
strategy:
matrix:
python-version: ['3.11']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# note this install is likely relevant for all ubuntu users...
# taken from https://www.reddit.com/r/github/comments/10aenmk/help_linux_action_cant_find_opengl_all_of_a_sudden/
- name: Update packages
run: sudo apt-get update
- name: Install packages
run: sudo apt-get install --fix-missing libgl1-mesa-dev
# - name: Install X11 and xcb dependencies
# run: |
# sudo apt-get update
# sudo apt-get install -y xvfb libxcb1 x11-apps
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Configure Poetry
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
poetry config virtualenvs.create false
- name: Install dependencies
run: poetry install
# - name: Run tests with xvfb
# run: xvfb-run --auto-servernum --server-args='-screen 0, 1024x768x24' poetry run pytest
- name: Run tests
run: poetry run pytest