-
Notifications
You must be signed in to change notification settings - Fork 5
56 lines (43 loc) · 1.44 KB
/
python-package.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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: python package
on:
push:
branches: [ master, github-actions ]
pull_request:
branches: [ master, github-actions ]
jobs:
build:
strategy:
matrix:
python-version: [3.7, 3.8]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install library
run: |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt update
sudo apt install gdal-bin libgdal-dev
- name: Install Poetry
uses: snok/install-poetry@v1.1.1
with:
virtualenvs-in-project: false
virtualenvs-path: ~/my-custom-path
- name: Install dependencies
run: |
poetry run pip install --upgrade pip
poetry install
- name: Code quality
run: poetry run black . --check
- name: Test with pytest
run: poetry run pytest --cov=./ --cov-report xml
- name: Code coverage
uses: codecov/codecov-action@v1
with:
token: 025e20a3-f046-4a80-a954-7c6cdb1676af