Skip to content

Commit 488aeba

Browse files
author
vtm9
committed
Fix cache for github actions
1 parent e87fa48 commit 488aeba

2 files changed

Lines changed: 27 additions & 28 deletions

File tree

.github/workflows/master.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,26 +38,26 @@ jobs:
3838
otp-version: '24.0.5'
3939
elixir-version: '1.12.3'
4040

41-
# - uses: actions/cache@v2
42-
# with:
43-
# path: services/app/deps
44-
# key: v2-${{ runner.os }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/services/app/mix.lock')) }}
45-
# restore-keys: |
46-
# ${{ runner.os }}-deps-
47-
48-
# - uses: actions/cache@v2
49-
# with:
50-
# path: services/app/_build
51-
# key: v2-${{ runner.os }}-build-${{ hashFiles(format('{0}{1}', github.workspace, '/services/app/mix.lock')) }}
52-
# restore-keys: |
53-
# ${{ runner.os }}-build-
54-
55-
# - uses: actions/cache@v2
56-
# with:
57-
# path: ~/.mix
58-
# key: v2-${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/services/app/mix.lock')) }}
59-
# restore-keys: |
60-
# ${{ runner.os }}-mix-
41+
- uses: actions/cache@v2
42+
with:
43+
path: services/app/deps
44+
key: v2-${{ runner.os }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/services/app/mix.lock')) }}
45+
restore-keys: |
46+
v2-${{ runner.os }}-deps-
47+
48+
- uses: actions/cache@v2
49+
with:
50+
path: services/app/_build
51+
key: v2-${{ runner.os }}-build-${{ hashFiles(format('{0}{1}', github.workspace, '/services/app/mix.lock')) }}
52+
restore-keys: |
53+
v2-${{ runner.os }}-build-
54+
55+
- uses: actions/cache@v2
56+
with:
57+
path: ~/.mix
58+
key: v2-${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/services/app/mix.lock')) }}
59+
restore-keys: |
60+
v2-${{ runner.os }}-mix-
6161
6262
- name: Get deps
6363
run: mix deps.get

.github/workflows/pr.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ on:
66
- master
77
jobs:
88
build:
9-
runs-on: ubuntu-18.04
9+
runs-on: ubuntu-latest
1010

1111
services:
1212
db:
1313
image: postgres:10.11
14-
ports: ["5432:5432"]
14+
ports: ['5432:5432']
1515
options: >-
1616
--health-cmd pg_isready
1717
--health-interval 10s
@@ -22,29 +22,29 @@ jobs:
2222
- uses: actions/checkout@v2
2323
- uses: erlef/setup-beam@v1
2424
with:
25-
otp-version: "24.0.5"
26-
elixir-version: "1.12.3"
25+
otp-version: '24.0.5'
26+
elixir-version: '1.12.3'
2727

2828
- uses: actions/cache@v2
2929
with:
3030
path: services/app/deps
3131
key: v2-${{ runner.os }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/services/app/mix.lock')) }}
3232
restore-keys: |
33-
${{ runner.os }}-deps-
33+
v2-${{ runner.os }}-deps-
3434
3535
- uses: actions/cache@v2
3636
with:
3737
path: services/app/_build
3838
key: v2-${{ runner.os }}-build-${{ hashFiles(format('{0}{1}', github.workspace, '/services/app/mix.lock')) }}
3939
restore-keys: |
40-
${{ runner.os }}-build-
40+
v2-${{ runner.os }}-build-
4141
4242
- uses: actions/cache@v2
4343
with:
4444
path: ~/.mix
4545
key: v2-${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/services/app/mix.lock')) }}
4646
restore-keys: |
47-
${{ runner.os }}-mix-
47+
v2-${{ runner.os }}-mix-
4848
4949
- name: Get deps
5050
run: mix deps.get
@@ -93,7 +93,6 @@ jobs:
9393

9494
- run: make test
9595

96-
9796
- name: Upload coverage to Codecov
9897
uses: codecov/codecov-action@v1
9998
with:

0 commit comments

Comments
 (0)