-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (61 loc) · 1.97 KB
/
elixir.yml
File metadata and controls
75 lines (61 loc) · 1.97 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Devspot CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
services:
db:
image: postgres:11
ports: ['5432:5432']
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-elixir@885971a72ed1f9240973bd92ab57af8c1aa68f24
with:
elixir-version: '1.11.3' # Define the elixir version [required]
otp-version: '23.2' # Define the OTP version [required]
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Check Formatting
run: mix format --check-formatted
- name: Run Credo
run: mix credo --strict
- name: Run tests
run: mix test
deploy:
needs: build # Will only run if the build job succeeds
if: github.ref == 'refs/heads/main' # Only run this job if it is on the main branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: main # Check out main instead of the latest commit
fetch-depth: 0 # Checkout the whole branch
- uses: actions/setup-python@v2
with:
python-version: 3.8.1
- uses: mhanberg/gigalixir-action@v0.4.3
with:
GIGALIXIR_APP: magenta-baggy-damselfly # Feel free to also put this in your secrets
GIGALIXIR_USERNAME: ${{ secrets.GIGALIXIR_USERNAME }}
GIGALIXIR_PASSWORD: ${{ secrets.GIGALIXIR_PASSWORD }}
MIGRATIONS: false # defaults to true
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}