Skip to content

Commit

Permalink
Some fixes for intermittent error (#184)
Browse files Browse the repository at this point in the history
* Update workflow (revisit parallel execusion, update cache, apply retry)

* Ensure to stop dummy http server
  • Loading branch information
parroty committed Jan 28, 2022
1 parent 6b52561 commit 5aa3324
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ jobs:
otp: ['21','23']
elixir: ['1.10', '1.11']
global-mock: [true, false]
max-parallel: 1
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -25,11 +21,18 @@ jobs:
with:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- uses: actions/cache@v1
- uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-mix-
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-
- run: mix deps.get
- run: mix coveralls.github
- uses: nick-invision/retry@v2
with:
timeout_minutes: 3
max_attempts: 3
shell: bash
command: mix coveralls.github
3 changes: 3 additions & 0 deletions test/handler_options_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ defmodule ExVCR.Adapter.HandlerOptionsTest do

setup_all do
HTTPotion.start
on_exit fn ->
HttpServer.stop(@port)
end
:ok
end

Expand Down
3 changes: 3 additions & 0 deletions test/ignore_localhost_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ defmodule ExVCR.IgnoreLocalhostTest do

setup_all do
HTTPotion.start
on_exit fn ->
HttpServer.stop(@port)
end
:ok
end

Expand Down
3 changes: 3 additions & 0 deletions test/ignore_urls_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ defmodule ExVCR.IgnoreUrlsTest do

setup_all do
HTTPotion.start
on_exit fn ->
HttpServer.stop(@port)
end
:ok
end

Expand Down

0 comments on commit 5aa3324

Please sign in to comment.