ci: run example config check in ci
This commit is contained in:
parent
a069b351fd
commit
41de679557
|
@ -88,6 +88,30 @@ jobs:
|
||||||
name: source-${{ matrix.profile }}-${{ matrix.otp }}
|
name: source-${{ matrix.profile }}-${{ matrix.otp }}
|
||||||
path: source.zip
|
path: source.zip
|
||||||
|
|
||||||
|
check_examples:
|
||||||
|
needs:
|
||||||
|
- build-matrix
|
||||||
|
- prepare
|
||||||
|
runs-on: ${{ needs.build-matrix.outputs.runs-on }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include: ${{ fromJson(needs.build-matrix.outputs.prepare) }}
|
||||||
|
container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-ubuntu22.04"
|
||||||
|
steps:
|
||||||
|
- uses: AutoModality/action-clean@v1
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: source-${{ matrix.profile }}-${{ matrix.otp }}
|
||||||
|
path: .
|
||||||
|
- name: unzip source code
|
||||||
|
run: unzip -o -q source.zip
|
||||||
|
- name: check example config files
|
||||||
|
env:
|
||||||
|
PROFILE: ${{ matrix.profile }}
|
||||||
|
working-directory: source
|
||||||
|
run: ./scripts/test/check-example-configs.sh
|
||||||
|
|
||||||
static_checks:
|
static_checks:
|
||||||
needs:
|
needs:
|
||||||
- build-matrix
|
- build-matrix
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{application, emqx_prometheus, [
|
{application, emqx_prometheus, [
|
||||||
{description, "Prometheus for EMQX"},
|
{description, "Prometheus for EMQX"},
|
||||||
% strict semver, bump manually!
|
% strict semver, bump manually!
|
||||||
{vsn, "5.0.12"},
|
{vsn, "5.0.13"},
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{registered, [emqx_prometheus_sup]},
|
{registered, [emqx_prometheus_sup]},
|
||||||
{applications, [kernel, stdlib, prometheus, emqx, emqx_management]},
|
{applications, [kernel, stdlib, prometheus, emqx, emqx_management]},
|
||||||
|
|
|
@ -9,7 +9,6 @@ SCHEMA_MOD='emqx_conf_schema'
|
||||||
if [ "${PROFILE}" = 'emqx-enterprise' ]; then
|
if [ "${PROFILE}" = 'emqx-enterprise' ]; then
|
||||||
DIR_NAME='ee-examples'
|
DIR_NAME='ee-examples'
|
||||||
SCHEMA_MOD='emqx_enterprise_schema'
|
SCHEMA_MOD='emqx_enterprise_schema'
|
||||||
PA=""
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
IFS=$'\n' read -r -d '' -a FILES < <(find "${PROJ_DIR}/rel/config/${DIR_NAME}" -name "*.example" 2>/dev/null | sort && printf '\0')
|
IFS=$'\n' read -r -d '' -a FILES < <(find "${PROJ_DIR}/rel/config/${DIR_NAME}" -name "*.example" 2>/dev/null | sort && printf '\0')
|
||||||
|
@ -49,6 +48,6 @@ check_file() {
|
||||||
end."
|
end."
|
||||||
}
|
}
|
||||||
|
|
||||||
for file in ${FILES[@]}; do
|
for file in "${FILES[@]}"; do
|
||||||
check_file "$file"
|
check_file "$file"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue