Skip to content

Commit 6016c4e

Browse files
committed
missing files
1 parent b61949d commit 6016c4e

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Python application
5+
6+
on:
7+
push:
8+
branches: [ "dev-auth" ]
9+
pull_request:
10+
branches: [ "dev-auth" ]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build:
17+
18+
runs-on: ubuntu-latest
19+
# Service containers to run with `container-job`
20+
services:
21+
# Label used to access the service container
22+
postgres:
23+
# Docker Hub image
24+
image: postgres:15.0
25+
# Provide the password for postgres
26+
env:
27+
POSTGRES_PASSWORD: postgres
28+
POSTGRES_HOST_AUTH_METHOD: trust
29+
POSTGRES_USER: postgres
30+
# Set health checks to wait until postgres has started
31+
options: >-
32+
--health-cmd pg_isready
33+
--health-interval 10s
34+
--health-timeout 5s
35+
--health-retries 5
36+
steps:
37+
- uses: actions/checkout@v3
38+
- name: Set up Python 3.12
39+
uses: actions/setup-python@v3
40+
with:
41+
python-version: "3.12"
42+
- name: Install dependencies
43+
run: |
44+
python -m pip install --upgrade pip
45+
pip install flake8 pytest
46+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
47+
- name: Lint with flake8
48+
run: |
49+
echo "Testing"
50+
# stop the build if there are Python syntax errors or undefined names
51+
#flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
52+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
53+
#flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
54+
- name: Test with pytest
55+
run: |
56+
pytest

0 commit comments

Comments
 (0)