-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (60 loc) · 2.05 KB
/
py-build.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
# This workflow will install Python dependencies and run tests with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: build
on:
- push
- pull_request
jobs:
build:
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name !=
github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- name: Checkout ZeroPlay
uses: actions/checkout@v3
with:
repository: donkirkby/zero-play
path: zero-play
- name: Checkout Shibumi Games
uses: actions/checkout@v3
with:
path: shibumi-games
- name: Set up Python
uses: actions/setup-python@v4
with:
# Sync with Pipfile
python-version: "3.10"
- name: Install missing package and fake XServer
run: |
# Work around missing deps: https://bugreports.qt.io/browse/QTBUG-84749
sudo apt-get update
sudo apt-get install -y -q freeglut3-dev xvfb libxkbcommon-x11-0 xserver-xephyr
- name: Install dependencies
run: |
pwd
cd shibumi-games
python -m pip install --upgrade pip
pip install pipenv
pipenv install --dev
pipenv graph
- name: Test with pytest
id: test
run: |
pwd
cd shibumi-games
MYPYPATH=../zero-play/ pipenv run mypy --install-types --non-interactive shibumi
# Add QT_DEBUG_PLUGINS=1 before xvfb-run to debug Qt library problems.
xvfb-run -a pipenv run coverage run --source=shibumi -m pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: shibumi-games
- name: Upload image diffs
uses: actions/upload-artifact@v3
if: ${{ always() && steps.test.outcome == 'failure' }}
with:
name: image-diffs
path: |
zero-play/tests/pixmap_diffs/*.png