-
Notifications
You must be signed in to change notification settings - Fork 11
81 lines (66 loc) · 2.45 KB
/
Copy pathvbt.yaml
File metadata and controls
81 lines (66 loc) · 2.45 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
76
77
78
79
80
81
name: "vbt"
on: push
jobs:
vbt_build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11.7
env:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
POSTGRES_DB: "vbt_test"
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
CACHE_VERSION: v11
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: 24.0
elixir-version: 1.12.2
- name: Restore cached deps
uses: actions/cache@v1
with:
path: deps
key: vbt-deps-${{ env.CACHE_VERSION }}-${{ github.ref }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
vbt-deps-${{ env.CACHE_VERSION }}-${{ github.ref }}-
vbt-deps-${{ env.CACHE_VERSION }}-
- name: Restore cached build
uses: actions/cache@v1
with:
path: _build
key: vbt-build-${{ env.CACHE_VERSION }}-${{ github.ref }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
vbt-build-${{ env.CACHE_VERSION }}-${{ github.ref }}-
vbt-build-${{ env.CACHE_VERSION }}-
- name: Fetch deps
run: mix deps.get
- name: Compile project
run: |
MIX_ENV=test mix compile --warnings-as-errors
MIX_ENV=dev mix compile --warnings-as-errors
MIX_ENV=prod mix compile --warnings-as-errors
- name: Check code format
run: mix format --check-formatted
- name: Run linter checks
run: mix credo list
- name: Run tests
run: mix test
- name: Run dialyzer
run: mix dialyzer
- name: Build docs
run: mix docs
#- name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
# aws-access-key-id: AKIA5B73P2OV7SEEGVWQ
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: us-east-1
#- name: "Release docs"
# if: github.ref == 'refs/heads/master' || contains(github.event.head_commit.message, '# push docs')
# run: aws s3 sync --acl public-read --region us-east-1 ./doc/ s3://vbt-common-docs.verybigthings.com/