Minor cleanup of redirect tests #8534
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: UDMI test suite | |
on: | |
push: | |
workflow_dispatch: | |
pull_request: | |
schedule: | |
- cron: '0 13 * * *' | |
concurrency: | |
group: ci-${{ github.repository }} | |
cancel-in-progress: true | |
jobs: | |
unit: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: start and test local servers | |
run: | | |
bin/setup_base | |
bin/clone_model | |
bin/start_pubsub | |
bin/test_mosquitto | |
- name: bin/run_tests all_tests | |
run: bin/run_tests all_tests | |
- name: all test output | |
if: ${{ always() }} | |
run: more out/test_* | |
spelling: | |
name: Docs Spelling Checks | |
runs-on: ubuntu-latest | |
timeout-minutes: 1 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check Spelling | |
uses: rojopolis/spellcheck-github-actions@0.23.0 | |
with: | |
config_path: .spellcheck.yml | |
task_name: Markdown | |
udmif: | |
name: UDMIF unit tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16.16.0 | |
- name: Install Angular CLI | |
run: npm install -g @angular/cli | |
- name: web tests | |
run: udmif/web/runTests | |
- name: api tests | |
run: udmif/api/runTests | |
pretest: | |
name: Pre-test Setup | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
timeout-minutes: 10 | |
if: vars.TARGET_PROJECT != '' | |
env: | |
PUSH_REGISTRY: ghcr.io | |
TARGET_PROJECT: ${{ vars.TARGET_PROJECT }} | |
UDMI_ALT_REGISTRY: ZZ-REDIRECT-NA | |
IMAGE_NAME: ${{ github.repository }} | |
GITHUB_REF: ${{ github.ref }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: sanity check | |
run: | | |
[[ -n $UDMI_ALT_REGISTRY ]] | |
[[ -n $TARGET_PROJECT ]] | |
- name: Log in to the github registry | |
if: ${{ github.event_name == 'push' }} | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.PUSH_REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup udmis container build | |
if: ${{ github.event_name == 'push' }} | |
run: | | |
revhash=$(git rev-parse $GITHUB_REF) | |
IMAGE_TAG=g${revhash:0:9} | |
PUSH_REPO=$PUSH_REGISTRY/${{ github.repository }} | |
PUSH_TAG=$PUSH_REPO:udmis-$IMAGE_TAG | |
echo PUSH_TAG=$PUSH_TAG >> $GITHUB_ENV | |
bin/container udmis prep --no-check $PUSH_REPO | |
echo Pushing built container as $PUSH_TAG | tee -a $GITHUB_STEP_SUMMARY | |
- name: Build and push docker image | |
if: ${{ github.event_name == 'push' }} | |
uses: docker/build-push-action@v4 | |
with: | |
file: udmis/Dockerfile.udmis | |
context: udmis | |
push: true | |
tags: ${{ env.PUSH_TAG }} | |
sequencer: | |
name: Sequencer Tests | |
runs-on: ubuntu-latest | |
needs: pretest | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false | |
matrix: | |
shard: [0, 1, 2, 3, 4, 5, 6, 7] | |
if: vars.TARGET_PROJECT != '' | |
env: | |
TARGET_PROJECT: ${{ vars.TARGET_PROJECT }} | |
UDMI_ALT_REGISTRY: ZZ-REDIRECT-NA | |
UDMI_REGISTRY_SUFFIX: _${{ matrix.shard }} | |
MATRIX_SHARD_COUNT: 8 | |
MATRIX_SHARD_INDEX: ${{ matrix.shard }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: base setup | |
run: bin/run_tests install_dependencies | |
- name: registrar clean | |
run: bin/test_regclean $TARGET_PROJECT | |
- name: sequence tests clean | |
run: bin/test_sequencer clean nocheck $TARGET_PROJECT | |
- name: sequence tests alpha | |
run: bin/test_sequencer alpha nocheck $TARGET_PROJECT | |
- name: sequence test timing | |
if: ${{ always() }} | |
run: egrep ' test .* after .*s ' out/sequencer.log.combined | |
- name: itemized sequencer tests | |
run: bin/test_itemized $TARGET_PROJECT | |
- name: itemized test timing | |
if: ${{ always() }} | |
run: egrep ' test .* after .*s ' out/sequencer.log-* | |
- name: output files | |
if: ${{ always() }} | |
run: more out/*.out* | cat | |
- name: pubber logs | |
if: ${{ always() }} | |
run: more out/pubber.log* pubber/out/*.json | cat | |
- name: support bundle | |
if: ${{ always() }} | |
run: bin/support ${{ github.repository_owner }}_${{ github.job }}_ | |
- uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
if-no-files-found: error | |
name: udmi-support_${{ github.run_id }} | |
path: '*_udmi-support_*.tgz' | |
baseline: | |
name: Baseline Tests | |
runs-on: ubuntu-latest | |
needs: pretest | |
timeout-minutes: 40 | |
if: vars.TARGET_PROJECT != '' | |
env: | |
TARGET_PROJECT: ${{ vars.TARGET_PROJECT }} | |
UDMI_ALT_REGISTRY: ZZ-REDIRECT-NA | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: base setup | |
run: bin/run_tests install_dependencies | |
- name: registrar clean | |
run: bin/test_regclean $TARGET_PROJECT | |
- name: telemetry validator | |
run: bin/test_validator $TARGET_PROJECT | |
- name: validator result | |
if: ${{ always() }} | |
run: cat /tmp/validator.out || true | |
- name: message captures | |
if: ${{ always() }} | |
run: | | |
cd sites/udmi_site_model/out | |
find . -type f | sort | xargs ls -l | |
find . -type f | sort | xargs more | cat | |
- name: nostate sequences | |
run: bin/test_sequencer clean nostate full $TARGET_PROJECT | |
- name: support bundle | |
if: ${{ always() }} | |
run: UDMI_REGISTRY_SUFFIX=_b bin/support ${{ github.repository_owner }}_${{ github.job }}_ | |
- uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
if-no-files-found: error | |
name: udmi-support_${{ github.run_id }} | |
path: '*_udmi-support_*.tgz' | |
redirect: | |
name: Endpoint Redirection | |
runs-on: ubuntu-latest | |
needs: [ pretest, baseline ] | |
timeout-minutes: 10 | |
if: vars.TARGET_PROJECT != '' | |
env: | |
TARGET_PROJECT: ${{ vars.TARGET_PROJECT }} | |
UDMI_ALT_REGISTRY: ZZ-REDIRECT-NA | |
MQTT_PROXY_HOST: ${{ vars.MQTT_PROXY_HOST }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: base setup | |
run: bin/run_tests install_dependencies | |
- name: bin/test_proxy | |
if: "${{ env.MQTT_PROXY_HOST != '' }}" | |
run: bin/test_proxy $TARGET_PROJECT $MQTT_PROXY_HOST | |
- name: bin/test_redirect | |
run: bin/test_redirect $TARGET_PROJECT | |
- name: pubber.log | |
if: ${{ always() }} | |
run: more out/pubber.log* | cat | |
- name: support bundle | |
if: ${{ always() }} | |
run: UDMI_REGISTRY_SUFFIX=_r bin/support ${{ github.repository_owner }}_${{ github.job }}_ | |
- uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
if-no-files-found: error | |
name: udmi-support_${{ github.run_id }} | |
path: '*_udmi-support_*.tgz' | |
posttest: | |
name: Post-test Summarization | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
needs: [ baseline, sequencer, redirect ] | |
if: vars.TARGET_PROJECT != '' && ${{ always() }} | |
env: | |
TARGET_PROJECT: ${{ vars.TARGET_PROJECT }} | |
UDMI_ALT_REGISTRY: ZZ-REDIRECT-NA | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Base setup | |
run: bin/setup_base | |
- name: Download all workflow run artifacts | |
uses: actions/download-artifact@v3 | |
- name: Processing support package | |
run: bin/support_process udmi-support_* | |
- name: Sequencer validation | |
run: bin/test_sequcheck |