Skip to content

Commit 96e5c95

Browse files
committed
Configure Azure Developer Pipeline
1 parent 7244319 commit 96e5c95

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

.github/workflows/azure-dev.yaml

Whitespace-only changes.

.github/workflows/python-test.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Python check
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test_package:
11+
name: Test ${{ matrix.os }} Python ${{ matrix.python_version }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: ["ubuntu-20.04"]
17+
python_version: ["3.11"]
18+
services:
19+
postgres:
20+
image: postgres:11
21+
env:
22+
POSTGRES_PASSWORD: postgres
23+
ports:
24+
- 5432:5432
25+
# needed because the postgres container does not provide a healthcheck
26+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
27+
steps:
28+
- uses: actions/checkout@v3
29+
- name: Setup python
30+
uses: actions/setup-python@v2
31+
with:
32+
python-version: ${{ matrix.python_version }}
33+
architecture: x64
34+
- name: Install dependencies
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install -r requirements.txt
38+
pip install flake8
39+
- name: Look for major issues with flake8
40+
run: |
41+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
42+
- name: Make sure Python code is all compilable
43+
run: |
44+
python -m compileall . -f
45+
- name: Run Flask server
46+
run: |
47+
flask db upgrade
48+
flask run &
49+
env:
50+
DBNAME: postgres
51+
DBHOST: localhost
52+
DBUSER: postgres
53+
DBPASS: postgres

0 commit comments

Comments
 (0)