Skip to content

Commit 5aa3324

Browse files
authored
Some fixes for intermittent error (#184)
* Update workflow (revisit parallel execusion, update cache, apply retry) * Ensure to stop dummy http server
1 parent 6b52561 commit 5aa3324

File tree

4 files changed

+22
-10
lines changed

4 files changed

+22
-10
lines changed

.github/workflows/tests.yml

+13-10
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ jobs:
1111
otp: ['21','23']
1212
elixir: ['1.10', '1.11']
1313
global-mock: [true, false]
14-
max-parallel: 1
15-
concurrency:
16-
group: ${{ github.ref }}
17-
cancel-in-progress: true
1814
env:
1915
MIX_ENV: test
2016
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -25,11 +21,18 @@ jobs:
2521
with:
2622
otp-version: ${{ matrix.otp }}
2723
elixir-version: ${{ matrix.elixir }}
28-
- uses: actions/cache@v1
24+
- uses: actions/cache@v2
2925
with:
30-
path: deps
31-
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
32-
restore-keys: |
33-
${{ runner.os }}-mix-
26+
path: |
27+
deps
28+
_build
29+
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
30+
restore-keys: |
31+
${{ runner.os }}-mix-
3432
- run: mix deps.get
35-
- run: mix coveralls.github
33+
- uses: nick-invision/retry@v2
34+
with:
35+
timeout_minutes: 3
36+
max_attempts: 3
37+
shell: bash
38+
command: mix coveralls.github

test/handler_options_test.exs

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ defmodule ExVCR.Adapter.HandlerOptionsTest do
88

99
setup_all do
1010
HTTPotion.start
11+
on_exit fn ->
12+
HttpServer.stop(@port)
13+
end
1114
:ok
1215
end
1316

test/ignore_localhost_test.exs

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ defmodule ExVCR.IgnoreLocalhostTest do
77

88
setup_all do
99
HTTPotion.start
10+
on_exit fn ->
11+
HttpServer.stop(@port)
12+
end
1013
:ok
1114
end
1215

test/ignore_urls_test.exs

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ defmodule ExVCR.IgnoreUrlsTest do
1111

1212
setup_all do
1313
HTTPotion.start
14+
on_exit fn ->
15+
HttpServer.stop(@port)
16+
end
1417
:ok
1518
end
1619

0 commit comments

Comments
 (0)