-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (45 loc) · 1.45 KB
/
test.yaml
File metadata and controls
47 lines (45 loc) · 1.45 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
name: Test
permissions: read-all
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install system dependencies
run: sudo apt-get install -y libmariadb-dev
- name: Create venv and install dependencies
run: |
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
- name: Install QT dependencies
run: |
sudo apt-get update
sudo apt-get install -y '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libegl1 libxcb-cursor0 xvfb
- name: Login to Hugging Face
run: |
source .venv/bin/activate
pip install huggingface_hub[cli]
huggingface-cli login --token ${{ secrets.WADAS_OFFICIAL_HUGGINGF_AUTH }}
- name: Run tests
run: |
source .venv/bin/activate
xvfb-run python -m pytest test -sv --cov=. --cov-report=html
# To enforce minimum coverage, uncomment the following line:
# xvfb-run python -m pytest test -sv --cov=. --cov-report=html --cov-fail-under=80
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: htmlcov/