-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (43 loc) · 1.18 KB
/
test.yaml
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
name: PR Validation
on:
workflow_dispatch:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
jobs:
precommit:
name: Static Analysis/Linting/Prettifier
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.draft == false && github.actor != 'dependabot[bot]' }}
steps:
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.9
- uses: pre-commit/action@v3.0.0
with:
extra_args: --color=always --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}
unit-tests:
name: Unit Tests
runs-on: qgis/qgis:release-3_30
if: ${{ github.event.pull_request.draft == false && github.actor != 'dependabot[bot]' }}
steps:
- name: Checkout code
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Deps
run: |
python -m pip install --upgrade pytest-qgis pydevd-pycharm
- name: Run Tests
run: |
poetry run pytest