-
Notifications
You must be signed in to change notification settings - Fork 3
72 lines (59 loc) · 1.81 KB
/
copi.yml
File metadata and controls
72 lines (59 loc) · 1.81 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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Elixir CI
on:
pull_request:
branches: [main]
env:
MIX_ENV: test
permissions:
contents: read
jobs:
build-test:
runs-on: ubuntu-latest # Or another supported runner
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: "$POSTGRES_TEST_PWD"
POSTGRES_DB: copi_test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
- name: Cache deps
id: cache-deps
uses: actions/cache@v3
env:
cache-name: cache-elixir-deps
with:
path: deps
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ env.cache-name }}-
- name: Cache compiled build
id: cache-build
uses: actions/cache@v3
env:
cache-name: cache-compiled-build
with:
path: _build
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ env.cache-name }}-
${{ runner.os }}-mix-
- name: Use Elixir 1.7
uses: erlef/setup-beam@v1.15
with:
elixir-version: 1.13.3 # Only accept exact Elixir 1.7.x version
otp-version: 24.3.4
- name: Install dependencies
run: mix deps.get
- name: Build the project
run: mix compile
# - name: Run tests
# run: mix test