-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 1.18 KB
/
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
name: ci
on:
push:
branches: [master, develop, feature/**]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15.3
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- name: Setup elixir
uses: erlef/setup-beam@v1
with:
elixir-version: 1.14.4 # Define the elixir version [required]
otp-version: 25.3.2.2 # Define the OTP version [required]
- name: Install Dependencies
run: mix deps.get
- name: Run Tests
run: mix test
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
FORMATION_PG_HOST: localhost
FORMATION_PG_USER: postgres
FORMATION_PG_PASSWORD: postgres
FORMATION_PG_PORT: ${{ job.services.postgres.ports[5432] }}