forked from libretime/libretime
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (72 loc) · 1.72 KB
/
api.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
name: API
on:
workflow_dispatch:
push:
branches: [main, stable]
paths:
- .github/workflows/_python.yml
- .github/workflows/api.yml
- api/**
- shared/**
- tools/python*
pull_request:
branches: [main, stable]
paths:
- .github/workflows/_python.yml
- .github/workflows/api.yml
- api/**
- shared/**
- tools/python*
schedule:
- cron: 0 1 * * 1
jobs:
python:
uses: ./.github/workflows/_python.yml
with:
context: api
test: false
test-with-database:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
release:
- focal
- bullseye
- jammy
services:
postgres:
image: postgres
env:
POSTGRES_USER: libretime
POSTGRES_PASSWORD: libretime
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
container:
image: ghcr.io/libretime/libretime-dev:${{ matrix.release }}
options: --user 1001:1001
defaults:
run:
shell: bash
env:
LIBRETIME_DATABASE_HOST: postgres
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ matrix.release }}-pip-api-${{ hashFiles('api/**/setup.py') }}
restore-keys: |
${{ matrix.release }}-pip-api
- name: Test
run: make test-coverage
working-directory: api
- name: Report coverage
uses: codecov/codecov-action@v3
with:
files: api/coverage.xml
flags: api
name: api