-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (60 loc) · 1.54 KB
/
check.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Check project in all branches
on:
workflow_call:
push:
branches-ignore:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
POSTGRES_USER: inclusive_dance
POSTGRES_PASSWORD: 3d88lacj9327s
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_DB: inclusive_dance_bot
jobs:
checking:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: make develop
- name: Run flake8
run: make flake
- name: Run black
run: make black
- name: Run bandit
run: make bandit
- name: Run mypy
run: make mypy
test:
name: Run service tests with pytest
runs-on: ubuntu-22.04
container: python:3.11
needs: checking
services:
postgres:
image: postgres:15
env:
TZ: UTC
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_DB: ${{ env.POSTGRES_DB }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: make develop
- name: Run pytest
run: make test-ci