-
Notifications
You must be signed in to change notification settings - Fork 7
42 lines (40 loc) · 1.28 KB
/
python.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
name: Python Tools and Tests
on: [ push ]
jobs:
build-analyze-test:
runs-on: ubuntu-22.04
name: "Build, Analyze and Test"
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- uses: awalsh128/cache-apt-pkgs-action@v1
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'poetry'
- name: Install system dependencies
run: sudo apt-get install -y --no-upgrade libzbar0 libgdal-dev libgl1
- name: Install numpy
run: poetry run pip install numpy==1.23.5
- name: Install pygdal
run: poetry run pip install pygdal==3.4.1.10
- name: Install dependencies
run: poetry install
- name: Run flake8
run: poetry run flake8 sketch_map_tool
continue-on-error: true
- name: Run bandit
run: poetry run bandit --recursive sketch_map_tool
continue-on-error: true
- name: Run black
run: poetry run black --check --diff sketch_map_tool
continue-on-error: true
- name: Run isort
run: poetry run isort --check --diff sketch_map_tool
continue-on-error: true
- name: Running tests
run: poetry run pytest tests/unit