ci: merge proper coverdata
This commit is contained in:
parent
632d5bf646
commit
b78c70a378
|
@ -14,7 +14,7 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run_proper_test:
|
eunit_and_proper:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
otp:
|
otp:
|
||||||
|
@ -48,9 +48,19 @@ jobs:
|
||||||
path: source/_build/default/lib/quicer/
|
path: source/_build/default/lib/quicer/
|
||||||
key: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_QUICER_REF }}
|
key: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_QUICER_REF }}
|
||||||
|
|
||||||
|
# produces eunit.coverdata
|
||||||
|
- name: eunit
|
||||||
|
run: make eunit
|
||||||
|
|
||||||
|
# produces proper.coverdata
|
||||||
- name: proper
|
- name: proper
|
||||||
run: make proper
|
run: make proper
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: coverdata
|
||||||
|
path: _build/test/cover
|
||||||
|
|
||||||
run_common_test:
|
run_common_test:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -81,32 +91,77 @@ jobs:
|
||||||
-f .ci/docker-compose-file/docker-compose-redis-single-tls.yaml \
|
-f .ci/docker-compose-file/docker-compose-redis-single-tls.yaml \
|
||||||
-f .ci/docker-compose-file/docker-compose.yaml \
|
-f .ci/docker-compose-file/docker-compose.yaml \
|
||||||
up -d --build
|
up -d --build
|
||||||
- name: run eunit
|
# produces ct.coverdata
|
||||||
run: |
|
|
||||||
docker exec -i ${{ matrix.otp_release }} bash -c "make eunit"
|
|
||||||
- name: run common test
|
- name: run common test
|
||||||
run: |
|
run: |
|
||||||
docker exec -i ${{ matrix.otp_release }} bash -c "make ct"
|
docker exec -i ${{ matrix.otp_release }} bash -c "make ct"
|
||||||
- name: run cover
|
|
||||||
run: |
|
|
||||||
printenv > .env
|
|
||||||
docker exec -i ${{ matrix.otp_release }} bash -c "DIAGNOSTIC=1 make cover"
|
|
||||||
docker exec --env-file .env -i ${{ matrix.otp_release }} bash -c "DIAGNOSTIC=1 make coveralls"
|
|
||||||
- name: cat rebar.crashdump
|
|
||||||
if: failure()
|
|
||||||
run: if [ -f 'rebar3.crashdump' ];then cat 'rebar3.crashdump'; fi
|
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v1
|
||||||
if: failure()
|
if: matrix.otp_release == 'erlang24'
|
||||||
with:
|
with:
|
||||||
name: logs_${{ matrix.otp_release }}
|
name: coverdata
|
||||||
path: _build/test/logs
|
|
||||||
- uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: cover_${{ matrix.otp_release }}
|
|
||||||
path: _build/test/cover
|
path: _build/test/cover
|
||||||
|
|
||||||
|
make_cover:
|
||||||
|
needs:
|
||||||
|
- eunit_and_proper
|
||||||
|
- run_common_test
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
otp:
|
||||||
|
- 24.2.1-1
|
||||||
|
elixir:
|
||||||
|
- 1.13.3
|
||||||
|
os:
|
||||||
|
- ubuntu20.04
|
||||||
|
arch:
|
||||||
|
- amd64
|
||||||
|
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
container: "ghcr.io/emqx/emqx-builder/5.0-8:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os }}"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Get deps git refs for cache
|
||||||
|
id: deps-refs
|
||||||
|
run: |
|
||||||
|
scripts/get-dep-refs.sh
|
||||||
|
make clean-all
|
||||||
|
- name: load rocksdb cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: source/_build/default/lib/rocksdb/
|
||||||
|
key: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_ROCKSDB_REF }}
|
||||||
|
- name: load quicer cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: source/_build/default/lib/quicer/
|
||||||
|
key: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_QUICER_REF }}
|
||||||
|
|
||||||
|
- name: compile test profile
|
||||||
|
run: |
|
||||||
|
DIAGNOSTIC=1 make cover
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
name: download coverdata
|
||||||
|
with:
|
||||||
|
name: coverdata
|
||||||
|
path: _build/test/cover
|
||||||
|
|
||||||
|
- name: make cover and send to coveralls
|
||||||
|
run: |
|
||||||
|
DIAGNOSTIC=1 make cover
|
||||||
|
DIAGNOSTIC=1 make coveralls
|
||||||
|
- name: cat rebar.crashdump
|
||||||
|
if: failure()
|
||||||
|
run: if [ -f 'rebar3.crashdump' ];then cat 'rebar3.crashdump'; fi
|
||||||
|
- uses: actions/upload-artifact@v1
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
name: logs_${{ matrix.otp_release }}
|
||||||
|
path: _build/test/logs
|
||||||
|
|
||||||
finish:
|
finish:
|
||||||
needs: run_common_test
|
needs: make_cover
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- name: Coveralls Finished
|
- name: Coveralls Finished
|
||||||
|
|
Loading…
Reference in New Issue