forked from 3liz/qgis_plugin_tools
-
Notifications
You must be signed in to change notification settings - Fork 8
57 lines (51 loc) · 1.38 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Validations for pull requests
on:
pull_request:
branches: [main]
jobs:
code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: pre-commit/[email protected]
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container:
image: qgis/qgis:${{ matrix.qgis-image-tag }}
strategy:
matrix:
qgis-image-tag:
- release-3_22
- release-3_28
- release-3_34
fail-fast: false
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- run: |
pip3 install -qr requirements-dev.txt
- run: |
pytest -v
env:
QT_QPA_PLATFORM: offscreen
QGIS_PLUGIN_IN_CI: 1
QGIS_PLUGIN_TOOLS_IN_CI: 1
build:
name: Build wheels and source distribution
needs: [code-style, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install build dependencies
run: python -m pip install --upgrade build
- name: Build
run:
python -m build
- uses: actions/upload-artifact@v3
with:
name: artifacts
path: dist/*
if-no-files-found: error