mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 05:23:03 +12:00
chore: only run coverage once (#103)
This commit is contained in:
parent
c5c51ebed9
commit
eb63bc9d4d
2 changed files with 25 additions and 9 deletions
|
@ -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)
|
||||
|
|
27
.github/workflows/elixir.yml
vendored
27
.github/workflows/elixir.yml
vendored
|
@ -26,7 +26,6 @@ jobs:
|
|||
otp: 23.0.3
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
ASH_CI: true
|
||||
steps:
|
||||
- run: sudo apt-get install --yes erlang-dev
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -51,6 +50,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')
|
||||
|
@ -62,7 +86,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
|
||||
|
|
Loading…
Reference in a new issue