forked from pblottiere/QSA
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (35 loc) · 1.4 KB
/
tests.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
name: Tests
# TODO: use proper rule
on:
push:
branches:
- '**'
jobs:
unit-tests:
defaults:
run:
working-directory: qsa-api
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: |
sudo apt update && sudo apt install -y gnupg wget software-properties-common && \
sudo wget -qO - https://qgis.org/downloads/qgis-2022.gpg.key | sudo gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/qgis-archive.gpg --import && \
sudo chmod a+r /etc/apt/trusted.gpg.d/qgis-archive.gpg && \
sudo add-apt-repository "deb https://qgis.org/ubuntu $(lsb_release -cs) main" && \
sudo add-apt-repository "deb https://qgis.org/ubuntu $(lsb_release -cs) main" && \
sudo apt update && \
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y python3-pip qgis python3-qgis python3-qgis-common python3-venv \
python3-pytest python3-mock xvfb qttools5-dev-tools && \
sudo apt-get clean
- run: sudo apt update && sudo apt install -y python3-poetry python3-flask python3-boto3
- run: poetry install
- run: |
python -m pip install --upgrade pip
pip install pytest
pytest -sv tests/test_api_storage_filesystem.py