-
Notifications
You must be signed in to change notification settings - Fork 28
43 lines (37 loc) · 937 Bytes
/
test.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
name: Test
on: [push, workflow_call]
env:
OTP_VERSION_SPEC: "25.3"
ELIXIR_VERSION_SPEC: "1.13.4"
MIX_ENV: test
PGUSER: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
jobs:
test:
runs-on: ubuntu-20.04
services:
postgres:
env:
POSTGRES_HOST_AUTH_METHOD: trust
image: postgres:9.5
ports:
- 5432:5432
options: >-
--health-cmd pg_isready --health-interval 10s
--health-timeout 5s --health-retries 5
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION_SPEC }}
elixir-version: ${{ env.ELIXIR_VERSION_SPEC }}
- name: Run Tests
run: |
mix deps.get
cp config/test.exs.GH_actions config/test.exs
mix ecto.create
mix test