Merge pull request #11449 from thalesmg/ci-restore-standalone-tests-20230815
ci: restore emqx app standalone tests
This commit is contained in:
commit
ea3c2d95f3
|
@ -146,6 +146,17 @@ jobs:
|
||||||
path: ${{ matrix.profile }}.zip
|
path: ${{ matrix.profile }}.zip
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
|
run_emqx_app_tests:
|
||||||
|
needs:
|
||||||
|
- sanity-checks
|
||||||
|
- compile
|
||||||
|
uses: ./.github/workflows/run_emqx_app_tests.yaml
|
||||||
|
with:
|
||||||
|
runner: ${{ needs.sanity-checks.outputs.runner }}
|
||||||
|
builder: ${{ needs.sanity-checks.outputs.builder }}
|
||||||
|
before_ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
|
||||||
|
after_ref: ${{ github.sha }}
|
||||||
|
|
||||||
run_test_cases:
|
run_test_cases:
|
||||||
needs:
|
needs:
|
||||||
- sanity-checks
|
- sanity-checks
|
||||||
|
|
|
@ -158,6 +158,17 @@ jobs:
|
||||||
path: ${{ matrix.profile }}.zip
|
path: ${{ matrix.profile }}.zip
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
|
run_emqx_app_tests:
|
||||||
|
needs:
|
||||||
|
- prepare
|
||||||
|
- compile
|
||||||
|
uses: ./.github/workflows/run_emqx_app_tests.yaml
|
||||||
|
with:
|
||||||
|
runner: ${{ needs.prepare.outputs.runner }}
|
||||||
|
builder: ${{ needs.prepare.outputs.builder }}
|
||||||
|
before_ref: ${{ github.event.before }}
|
||||||
|
after_ref: ${{ github.sha }}
|
||||||
|
|
||||||
run_test_cases:
|
run_test_cases:
|
||||||
if: needs.prepare.outputs.release != 'true'
|
if: needs.prepare.outputs.release != 'true'
|
||||||
needs:
|
needs:
|
||||||
|
|
|
@ -0,0 +1,65 @@
|
||||||
|
name: Check emqx app standalone
|
||||||
|
|
||||||
|
# These tests are needed because we provide the `emqx` application as a standalone
|
||||||
|
# dependency for plugins.
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: test-standalone-${{ github.event_name }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
runner:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
builder:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
before_ref:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
after_ref:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
env:
|
||||||
|
IS_CI: "yes"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run_emqx_app_tests:
|
||||||
|
runs-on: ${{ inputs.runner }}
|
||||||
|
container: ${{ inputs.builder }}
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: run
|
||||||
|
env:
|
||||||
|
BEFORE_REF: ${{ inputs.before_ref }}
|
||||||
|
AFTER_REF: ${{ inputs.after_ref }}
|
||||||
|
run: |
|
||||||
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||||
|
changed_files="$(git diff --name-only ${BEFORE_REF} ${AFTER_REF} apps/emqx)"
|
||||||
|
if [ "$changed_files" = '' ]; then
|
||||||
|
echo "nothing changed in apps/emqx, ignored."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
make ensure-rebar3
|
||||||
|
cp rebar3 apps/emqx/
|
||||||
|
cd apps/emqx
|
||||||
|
./rebar3 xref
|
||||||
|
./rebar3 dialyzer
|
||||||
|
./rebar3 eunit -v
|
||||||
|
./rebar3 ct --name 'test@127.0.0.1' -v --readable=true
|
||||||
|
./rebar3 proper -d test/props
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
name: logs-${{ inputs.runner }}
|
||||||
|
path: apps/emqx/_build/test/logs
|
Loading…
Reference in New Issue