-
Notifications
You must be signed in to change notification settings - Fork 66
58 lines (54 loc) · 1.62 KB
/
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
name: Lint and Test
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python_version: ['3.9']
os: [ubuntu-latest, macOS-latest, windows-latest]
anki: ['2.1.54']
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install virtualenv
python -m virtualenv pyenv
if [ "${{ runner.os }}" = "Windows" ]; then
source pyenv/Scripts/activate
else
# Qt6 complains because Ubuntu is missing libEGL.so.1
if [ "${{ runner.os }}" = "Linux" ]; then
sudo apt-get update -y -qq
sudo apt-get install -y -qq libegl1
fi
source pyenv/bin/activate
fi
python -m pip install aqt[qt5]==${{ matrix.anki }} aqt[qt6]==${{ matrix.anki }} anki==${{ matrix.anki }} PyQt6-WebEngine pylint
- name: Lint
shell: bash
run: |
if [ "${{ runner.os }}" = "Windows" ]; then
source pyenv/Scripts/activate
else
source pyenv/bin/activate
fi
export PYTHONPATH=./
python -m pylint . morph test -d W0611
- name: Test
shell: bash
run: |
if [ "${{ runner.os }}" = "Windows" ]; then
source pyenv/Scripts/activate
else
source pyenv/bin/activate
fi
export QT_QPA_PLATFORM=minimal
export PYTHONPATH=./
python test.py