Compare commits
16 Commits
master
...
coveralls-
Author | SHA1 | Date |
---|---|---|
![]() |
cd347775cc | |
![]() |
227c6dda2f | |
![]() |
c3f194710c | |
![]() |
4000cd2224 | |
![]() |
a9bedf8be2 | |
![]() |
a9fd4df238 | |
![]() |
4c74b84b34 | |
![]() |
214d3427c3 | |
![]() |
6a3560868f | |
![]() |
1f8ef341d6 | |
![]() |
bd1c4f9e62 | |
![]() |
93f411964b | |
![]() |
87a9da2fe9 | |
![]() |
751e88e24f | |
![]() |
67c17b2ac9 | |
![]() |
4ab5740952 |
|
@ -14,9 +14,6 @@ on:
|
||||||
env:
|
env:
|
||||||
IS_CI: "yes"
|
IS_CI: "yes"
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sanity-checks:
|
sanity-checks:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
@ -32,6 +29,9 @@ jobs:
|
||||||
otp_vsn: "26.2.1-2"
|
otp_vsn: "26.2.1-2"
|
||||||
elixir_vsn: "1.15.7"
|
elixir_vsn: "1.15.7"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
|
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
|
||||||
with:
|
with:
|
||||||
|
@ -127,6 +127,9 @@ jobs:
|
||||||
- emqx
|
- emqx
|
||||||
- emqx-enterprise
|
- emqx-enterprise
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
|
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -13,9 +13,10 @@ on:
|
||||||
- 'master'
|
- 'master'
|
||||||
- 'release-5[0-9]'
|
- 'release-5[0-9]'
|
||||||
- 'ci/**'
|
- 'ci/**'
|
||||||
|
workflow_dispatch:
|
||||||
permissions:
|
inputs:
|
||||||
contents: read
|
ref:
|
||||||
|
required: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
IS_CI: 'yes'
|
IS_CI: 'yes'
|
||||||
|
@ -36,6 +37,9 @@ jobs:
|
||||||
otp_vsn: '26.2.1-2'
|
otp_vsn: '26.2.1-2'
|
||||||
elixir_vsn: '1.15.7'
|
elixir_vsn: '1.15.7'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
|
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
|
||||||
with:
|
with:
|
||||||
|
@ -132,6 +136,9 @@ jobs:
|
||||||
- emqx
|
- emqx
|
||||||
- emqx-enterprise
|
- emqx-enterprise
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
|
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -20,9 +20,6 @@ on:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
IS_CI: "yes"
|
IS_CI: "yes"
|
||||||
|
|
||||||
|
@ -40,35 +37,39 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu22.04"
|
container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu22.04"
|
||||||
|
|
||||||
|
env:
|
||||||
|
PROFILE: ${{ matrix.profile }}
|
||||||
|
ENABLE_COVER_COMPILE: 1
|
||||||
|
CT_COVER_EXPORT_PREFIX: ${{ matrix.profile }}-${{ matrix.otp }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
|
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.profile }}
|
name: ${{ matrix.profile }}
|
||||||
|
|
||||||
- name: extract artifact
|
- name: extract artifact
|
||||||
run: |
|
run: |
|
||||||
unzip -o -q ${{ matrix.profile }}.zip
|
unzip -o -q ${{ matrix.profile }}.zip
|
||||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||||
# produces eunit.coverdata
|
# produces eunit.coverdata
|
||||||
- name: eunit
|
- run: make eunit
|
||||||
env:
|
|
||||||
PROFILE: ${{ matrix.profile }}
|
|
||||||
ENABLE_COVER_COMPILE: 1
|
|
||||||
CT_COVER_EXPORT_PREFIX: ${{ matrix.profile }}-${{ matrix.otp }}
|
|
||||||
run: make eunit
|
|
||||||
|
|
||||||
# produces proper.coverdata
|
# produces proper.coverdata
|
||||||
- name: proper
|
- run: make proper
|
||||||
env:
|
|
||||||
PROFILE: ${{ matrix.profile }}
|
|
||||||
ENABLE_COVER_COMPILE: 1
|
|
||||||
CT_COVER_EXPORT_PREFIX: ${{ matrix.profile }}-${{ matrix.otp }}
|
|
||||||
run: make proper
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
- run: make cover
|
||||||
with:
|
|
||||||
name: coverdata-${{ matrix.profile }}-${{ matrix.otp }}
|
- name: send to coveralls
|
||||||
path: _build/test/cover
|
if: github.repository == 'emqx/emqx'
|
||||||
retention-days: 7
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: make coveralls
|
||||||
|
|
||||||
|
- run: cat rebar3.crashdump
|
||||||
|
if: failure()
|
||||||
|
|
||||||
ct_docker:
|
ct_docker:
|
||||||
runs-on: ${{ github.repository_owner == 'emqx' && fromJSON('["self-hosted","ephemeral","linux","x64"]') || 'ubuntu-22.04' }}
|
runs-on: ${{ github.repository_owner == 'emqx' && fromJSON('["self-hosted","ephemeral","linux","x64"]') || 'ubuntu-22.04' }}
|
||||||
|
@ -82,6 +83,12 @@ jobs:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
env:
|
||||||
|
PROFILE: ${{ matrix.profile }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
|
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
|
||||||
with:
|
with:
|
||||||
|
@ -89,7 +96,6 @@ jobs:
|
||||||
- name: extract artifact
|
- name: extract artifact
|
||||||
run: |
|
run: |
|
||||||
unzip -o -q ${{ matrix.profile }}.zip
|
unzip -o -q ${{ matrix.profile }}.zip
|
||||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
||||||
|
|
||||||
# produces $PROFILE-<app-name>-<otp-vsn>-sg<suitegroup>.coverdata
|
# produces $PROFILE-<app-name>-<otp-vsn>-sg<suitegroup>.coverdata
|
||||||
- name: run common tests
|
- name: run common tests
|
||||||
|
@ -103,19 +109,30 @@ jobs:
|
||||||
TDENGINE_TAG: "3.0.2.4"
|
TDENGINE_TAG: "3.0.2.4"
|
||||||
OPENTS_TAG: "9aa7f88"
|
OPENTS_TAG: "9aa7f88"
|
||||||
MINIO_TAG: "RELEASE.2023-03-20T20-16-18Z"
|
MINIO_TAG: "RELEASE.2023-03-20T20-16-18Z"
|
||||||
PROFILE: ${{ matrix.profile }}
|
|
||||||
SUITEGROUP: ${{ matrix.suitegroup }}
|
SUITEGROUP: ${{ matrix.suitegroup }}
|
||||||
ENABLE_COVER_COMPILE: 1
|
ENABLE_COVER_COMPILE: 1
|
||||||
CT_COVER_EXPORT_PREFIX: ${{ matrix.profile }}-${{ matrix.otp }}-sg${{ matrix.suitegroup }}
|
CT_COVER_EXPORT_PREFIX: ${{ matrix.profile }}-${{ matrix.otp }}-sg${{ matrix.suitegroup }}
|
||||||
run: ./scripts/ct/run.sh --ci --app ${{ matrix.app }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
run: ./scripts/ct/run.sh --ci --app ${{ matrix.app }} --keep-up
|
||||||
with:
|
|
||||||
name: coverdata-${{ matrix.profile }}-${{ matrix.prefix }}-${{ matrix.otp }}-sg${{ matrix.suitegroup }}
|
- name: make cover
|
||||||
path: _build/test/cover
|
run: |
|
||||||
retention-days: 7
|
docker exec -e PROFILE="$PROFILE" -t erlang make cover
|
||||||
|
|
||||||
|
- name: send to coveralls
|
||||||
|
if: github.repository == 'emqx/emqx'
|
||||||
|
run: |
|
||||||
|
ls _build/test/cover/*.coverdata || exit 0
|
||||||
|
docker exec -e PROFILE="$PROFILE" -t erlang make coveralls
|
||||||
|
|
||||||
|
- name: rebar3.crashdump
|
||||||
|
if: failure()
|
||||||
|
run: cat rebar3.crashdump
|
||||||
|
|
||||||
- name: compress logs
|
- name: compress logs
|
||||||
if: failure()
|
if: failure()
|
||||||
run: tar -czf logs.tar.gz _build/test/logs
|
run: tar -czf logs.tar.gz _build/test/logs
|
||||||
|
|
||||||
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
|
@ -137,6 +154,15 @@ jobs:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
env:
|
||||||
|
PROFILE: ${{ matrix.profile }}
|
||||||
|
SUITEGROUP: ${{ matrix.suitegroup }}
|
||||||
|
ENABLE_COVER_COMPILE: 1
|
||||||
|
CT_COVER_EXPORT_PREFIX: ${{ matrix.profile }}-${{ matrix.otp }}-sg${{ matrix.suitegroup }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
|
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
|
||||||
with:
|
with:
|
||||||
|
@ -148,22 +174,25 @@ jobs:
|
||||||
|
|
||||||
# produces $PROFILE-<app-name>-<otp-vsn>-sg<suitegroup>.coverdata
|
# produces $PROFILE-<app-name>-<otp-vsn>-sg<suitegroup>.coverdata
|
||||||
- name: run common tests
|
- name: run common tests
|
||||||
|
run: make "${{ matrix.app }}-ct"
|
||||||
|
|
||||||
|
- run: make cover
|
||||||
|
|
||||||
|
- name: send to coveralls
|
||||||
|
if: github.repository == 'emqx/emqx'
|
||||||
env:
|
env:
|
||||||
PROFILE: ${{ matrix.profile }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
SUITEGROUP: ${{ matrix.suitegroup }}
|
|
||||||
ENABLE_COVER_COMPILE: 1
|
|
||||||
CT_COVER_EXPORT_PREFIX: ${{ matrix.profile }}-${{ matrix.otp }}-sg${{ matrix.suitegroup }}
|
|
||||||
run: |
|
run: |
|
||||||
make "${{ matrix.app }}-ct"
|
ls _build/test/cover/*.coverdata || exit 0
|
||||||
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
make coveralls
|
||||||
with:
|
|
||||||
name: coverdata-${{ matrix.profile }}-${{ matrix.prefix }}-${{ matrix.otp }}-sg${{ matrix.suitegroup }}
|
- run: cat rebar3.crashdump
|
||||||
path: _build/test/cover
|
if: failure()
|
||||||
if-no-files-found: warn # do not fail if no coverdata found
|
|
||||||
retention-days: 7
|
|
||||||
- name: compress logs
|
- name: compress logs
|
||||||
if: failure()
|
if: failure()
|
||||||
run: tar -czf logs.tar.gz _build/test/logs
|
run: tar -czf logs.tar.gz _build/test/logs
|
||||||
|
|
||||||
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
|
@ -180,61 +209,18 @@ jobs:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Coveralls finished
|
||||||
|
if: github.repository == 'emqx/emqx'
|
||||||
|
uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 # v2.2.3
|
||||||
|
with:
|
||||||
|
parallel-finished: true
|
||||||
|
git-branch: ${{ github.ref }}
|
||||||
|
git-commit: ${{ github.sha }}
|
||||||
|
|
||||||
- run: echo "All tests passed"
|
- run: echo "All tests passed"
|
||||||
|
|
||||||
make_cover:
|
|
||||||
needs:
|
|
||||||
- eunit_and_proper
|
|
||||||
- ct
|
|
||||||
- ct_docker
|
|
||||||
runs-on: ${{ endsWith(github.repository, '/emqx') && 'ubuntu-22.04' || fromJSON('["self-hosted","ephemeral","linux","x64"]') }}
|
|
||||||
container: ${{ inputs.builder }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
profile:
|
|
||||||
- emqx-enterprise
|
|
||||||
steps:
|
|
||||||
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
|
|
||||||
with:
|
|
||||||
name: ${{ matrix.profile }}
|
|
||||||
- name: extract artifact
|
|
||||||
run: |
|
|
||||||
unzip -o -q ${{ matrix.profile }}.zip
|
|
||||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
|
|
||||||
name: download coverdata
|
|
||||||
with:
|
|
||||||
pattern: coverdata-${{ matrix.profile }}-*
|
|
||||||
path: _build/test/cover
|
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: make cover
|
|
||||||
env:
|
|
||||||
PROFILE: emqx-enterprise
|
|
||||||
run: make cover
|
|
||||||
|
|
||||||
- name: send to coveralls
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
PROFILE: emqx-enterprise
|
|
||||||
run: make coveralls
|
|
||||||
|
|
||||||
- name: get coveralls logs
|
|
||||||
if: failure()
|
|
||||||
run: cat rebar3.crashdump
|
|
||||||
|
|
||||||
# do this in a separate job
|
|
||||||
upload_coverdata:
|
|
||||||
needs: make_cover
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: Coveralls Finished
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
curl -v -k https://coveralls.io/webhook \
|
|
||||||
--header "Content-Type: application/json" \
|
|
||||||
--data "{\"repo_name\":\"$GITHUB_REPOSITORY\",\"repo_token\":\"$GITHUB_TOKEN\",\"payload\":{\"build_num\":$GITHUB_RUN_ID,\"status\":\"done\"}}" || true
|
|
||||||
|
|
Loading…
Reference in New Issue