-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (54 loc) · 1.31 KB
/
on_pull_request.yml
File metadata and controls
57 lines (54 loc) · 1.31 KB
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
47
48
49
50
51
52
53
54
55
56
57
name: CI
on:
pull_request:
branches:
- master
paths-ignore:
- 'README.md'
- 'LICENSE-AGPLv3.txt'
- 'CODE_OF_CONDUCT.md'
- 'CONTRIBUTING.md'
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
container:
image: elixir:1.11.3
services:
postgres:
image: postgres:10.4
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: liquid_voting_test
ports:
- 5432:5432
# postgres container doesn't provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: Run Tests
run: mix test
env:
MIX_ENV: test
# refers to the service name, since we're running on containers
POSTGRES_HOST: postgres
linting:
name: Linting
runs-on: ubuntu-latest
container:
image: elixir:1.11.3
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: Run Formatter
run: mix format --check-formatted