Skip to content

Commit 31e2b7e

Browse files
authored
Create elixir.yml
1 parent fa2f26b commit 31e2b7e

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/elixir.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Elixir CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
env:
13+
MIX_ENV: test
14+
15+
services:
16+
db:
17+
image: postgres:9.5
18+
env:
19+
POSTGRES_USER: postgres
20+
POSTGRES_PASSWORD: postgres
21+
POSTGRES_DB: airbase_test
22+
ports:
23+
- 5432:5432
24+
# needed because the postgres container does not provide a healthcheck
25+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
26+
27+
steps:
28+
- uses: actions/checkout@v2
29+
- name: Setup elixir
30+
uses: actions/setup-elixir@v1
31+
with:
32+
elixir-version: 1.9.4 # Define the elixir version [required]
33+
otp-version: 22.2 # Define the OTP version [required]
34+
- name: Install Dependencies
35+
run: mix deps.get
36+
- name: Migrate
37+
run: mix do ecto.create, ecto.migrate
38+
- name: Run Tests
39+
run: mix test

0 commit comments

Comments
 (0)