-
Notifications
You must be signed in to change notification settings - Fork 6
96 lines (87 loc) · 2.34 KB
/
build.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Build
on:
pull_request:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
ports:
- "5432:5432"
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
strategy:
matrix:
container:
- image: python:latest
toxenv: lint
- image: python:3.7
toxenv: py37-sqla12
- image: python:3.7
toxenv: py37-sqla13
- image: python:3.7
toxenv: py37-sqla14
- image: python:3.8
toxenv: py38-sqla12
- image: python:3.8
toxenv: py38-sqla13
- image: python:3.8
toxenv: py38-sqla14
- image: python:3.9
toxenv: py39-sqla12
- image: python:3.9
toxenv: py39-sqla13
- image: python:3.9
toxenv: py39-sqla14
- image: python:3.10
toxenv: py310-sqla12
- image: python:3.10
toxenv: py310-sqla13
- image: python:3.10
toxenv: py310-sqla14
- image: python:3.11
toxenv: py311-sqla12
- image: python:3.11
toxenv: py311-sqla13
- image: python:3.11
toxenv: py311-sqla14
container:
image: ${{ matrix.container.image }}
steps:
- uses: actions/checkout@v3
- run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Install dependencies
run: |
apt-get update
apt-get install -y postgresql-client
pip install pre-commit tox coveralls
- name: Tox
run: |
tox -f ${{ matrix.container.toxenv }}
env:
DATABASE_URL: postgresql://postgres:postgres@postgres
- name: Upload Coverage
if: "!startsWith('lint', matrix.container.toxenv)"
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
COVERALLS_FLAG_NAME: ${{ matrix.container.image }}
COVERALLS_PARALLEL: true
finish:
needs: build
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Coveralls Finished
run: |
pip3 install -U coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.github_token }}