-
Notifications
You must be signed in to change notification settings - Fork 5
34 lines (31 loc) · 885 Bytes
/
test.yml
File metadata and controls
34 lines (31 loc) · 885 Bytes
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
# On workflow call
name: test
on: workflow_call
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_DB: test
POSTGRES_PASSWORD: postgres
ports:
- '5432:5432'
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
- run: sudo apt-get update && sudo apt-get install libpq-dev postgresql-client -y
- run: pip install -r requirements.txt
- name: Test
run: ENV="test" pytest
timeout-minutes: 4