-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (35 loc) · 846 Bytes
/
ci.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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-and-test:
runs-on: ubuntu-latest
env:
LOG_LEVEL: debug
DATABASE_HOST: localhost
DATABASE_PORT: 5432
DATABASE_NAME: foxgres
DATABASE_USERNAME: admin
DATABASE_PASSWORD: admin
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Compose
run: sudo apt-get -y install docker-compose
- name: Build Docker images
run: docker-compose build
- name: Start all containers
run: docker-compose up -d
- name: Wait for database to be ready
run: sleep 10
- name: Run migration
run: docker-compose run migrate
- name: Run tests
run: swift test
- name: Stop services
run: docker-compose down