-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (40 loc) · 1.18 KB
/
test.yaml
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
name: Running Tests
on:
push:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install PostgreSQL client
run: |
sudo apt-get update
sudo apt-get install --yes postgresql-client
- name: Install suncalc_postgres
run: psql -h localhost -d postgres -U postgres -f test/create_test_events.sql -f suncalc/suncalc.sql
env:
PGPASSWORD: postgres
- name: Load test data
run: psql -h localhost -d postgres -U postgres -f test/create_test_events.sql -f test/create_test_positions.sql
env:
PGPASSWORD: postgres
- name: Run tests
run: psql -h localhost -d postgres -U postgres -f test/test.sql
env:
PGPASSWORD: postgres