Merge pull request #3 from ash-project/update-coverage

chore: only run coverage once
This commit is contained in:
Zach Daniel 2020-08-27 22:48:58 -04:00 committed by GitHub
commit 24e5bc7132
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 9 deletions

View file

@ -11,13 +11,6 @@
## ...or adjusted (e.g. use one-line formatter for more compact credo output)
# {:credo, "mix credo --format oneline"},
{:ex_unit,
command:
if System.get_env("ASH_CI") == "true" do
"mix coveralls.github"
else
"mix test"
end},
{:check_formatter, command: "mix ash.formatter --check"}
## custom new tools may be added (mix tasks or arbitrary commands)

View file

@ -20,7 +20,6 @@ jobs:
ash: ["master", "1.11.0", "1.10.0"]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ASH_CI: true
ASH_VERSION: ${{matrix.ash}}
steps:
- run: sudo apt-get install --yes erlang-dev
@ -46,6 +45,31 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v')
- run: mix check
if: "!startsWith(github.ref, 'refs/tags/v')"
coverage:
needs: [build]
runs-on: ubuntu-latest
name: Report Test Coverage
strategy:
matrix:
otp: ["23"]
elixir: ["1.10.0"]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- run: sudo apt-get install --yes erlang-dev
- uses: actions/checkout@v2
- uses: actions/setup-elixir@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- uses: actions/cache@v1
id: cache-deps
with:
path: deps
key: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-deps-2-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-deps-2-
- run: mix deps.get
- run: mix coveralls.github
release:
needs: [build]
if: startsWith(github.ref, 'refs/tags/v')
@ -57,7 +81,6 @@ jobs:
elixir: ["1.10.0"]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ASH_CI: true
steps:
- run: sudo apt-get install --yes erlang-dev
- uses: actions/checkout@v2