-
Notifications
You must be signed in to change notification settings - Fork 84
59 lines (48 loc) · 1.35 KB
/
ci.yaml
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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- "**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
runs-on: ubuntu-latest
services:
db:
image: postgres:14
env:
POSTGRES_DB: elixir_boilerplate_test
POSTGRES_PASSWORD: development
ports: ["5432:5432"]
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
MIX_ENV: test
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: erlef/setup-beam@v1
id: setup-beam
with:
version-file: .tool-versions
version-type: strict
- uses: actions/cache@v3
with:
path: |
deps
_build
priv/plts
key: ${{ runner.os }}-mix-${{ steps.setup-beam.outputs.otp-version }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ hashFiles(format('{0}/mix.lock', github.workspace)) }}
- uses: actions/setup-node@v3
with:
node-version-file: .tool-versions
cache: npm
- run: grep -v '^\(#.*\|\s\?\)$' .env.test >> $GITHUB_ENV
- run: make prepare
- run: make lint
- run: make check
- run: make build DOCKER_IMAGE_TAG=latest