diff options
author | Michael Abel <75477722+abelikt@users.noreply.github.com> | 2021-10-12 13:35:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-12 13:35:28 +0200 |
commit | bcad178aa889edd662d13f7933f5eab99b813318 (patch) | |
tree | 6288f2047c5e78086a1f827293023917331a5be7 /.github | |
parent | befc87e3c82aadcea4a5f39d0fa080b75bc4b93f (diff) |
Run all system tests on an offsite rpi (#466)
* Run all tests on an offsite rpi
* Update container name
* Run with debug enabled
* Update step names
* Fix workflow issues
* Remove unused variables
* For now continue on errors
* Accept review comments
* Add missing URL
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/system-test-offsite.yml | 139 |
1 files changed, 139 insertions, 0 deletions
diff --git a/.github/workflows/system-test-offsite.yml b/.github/workflows/system-test-offsite.yml new file mode 100644 index 00000000..6d9a21b5 --- /dev/null +++ b/.github/workflows/system-test-offsite.yml @@ -0,0 +1,139 @@ +name: system-test-offsite + +on: + workflow_dispatch: + branches: [ main] + workflow_run: + workflows: ["integration-test-workflow"] + branches: [main] + types: + - completed + +env: + CARGO_TERM_COLOR: always + +jobs: + + install-and-use-rpi-all-offsite: + runs-on: [self-hosted, Linux, ARM, offsiteall ] + if: ${{ github.event.workflow_run.conclusion == 'success' }} + + steps: + - name: checkout + uses: actions/checkout@v2 + + - name: Download artifact debian packages + uses: dawidd6/action-download-artifact@v2 + # https://github.com/marketplace/actions/download-workflow-artifact + with: + github_token: ${{secrets.GITHUB_TOKEN}} + workflow: build-workflow.yml + workflow_conclusion: success + branch: main + name: debian-packages-armv7-unknown-linux-gnueabihf + path: debian-package_unpack + + - name: delete old publisher + run: rm -f /home/pi/examples/sawtooth_publisher + + - name: Download artifact examples + uses: dawidd6/action-download-artifact@v2 + # https://github.com/marketplace/actions/download-workflow-artifact + with: + github_token: ${{secrets.GITHUB_TOKEN}} + workflow: build-workflow.yml + workflow_conclusion: success + branch: main + name: examples_armv7-unknown-linux-gnueabihf + path: /home/pi/examples + + - name: purge packages + run: sudo dpkg -P tedge_agent tedge_mapper tedge_apt_plugin tedge mosquitto-clients mosquitto libmosquitto1 collectd-core + continue-on-error: true + + - name: install packages + run: sudo apt-get --assume-yes install mosquitto-clients mosquitto libmosquitto1 collectd-core + + - name: install packages + run: sudo dpkg -i ./debian-package_unpack/*.deb + + - name: run tedge help + run: tedge --help + + # replace the default config file with tedge custom config file + - name: configure collectd + run: sudo cp "/etc/tedge/contrib/collectd/collectd.conf" "/etc/collectd/collectd.conf" + + - name: chmod publisher + run: chmod +x /home/pi/examples/sawtooth_publisher + + - name: Run Smoke Test + run: ./ci/ci_smoke_test.sh + env: + C8YPASS: ${{ secrets.SECRET_C8YPASS }} + C8YUSERNAME: ${{ secrets.SECRET_C8YUSERNAME }} + C8YTENANT: ${{secrets.SECRET_C8YTENANT}} + C8YDEVICE: ${{ secrets.SECRET_C8YDEVICE_OFFSITE_ALL }} + C8YDEVICEID: ${{ secrets.SECRET_C8YDEVICEID_OFFSITE_ALL }} + TEBASEDIR: /home/pi/actions-runner/_work/thin-edge.io/thin-edge.io/ + EXAMPLEDIR: /home/pi/examples + C8YURL: https://thin-edge-io.eu-latest.cumulocity.com + +# System Test Workflow + + system-test-all-offsite: + needs: [install-and-use-rpi-all-offsite] + runs-on: [self-hosted, Linux, ARM, offsiteall] + continue-on-error: true + + steps: + + - name: checkout + uses: actions/checkout@v2 + + - name: Run all Tests + continue-on-error: true + run: bash ./ci/ci_run_all_tests.sh + env: + C8YPASS: ${{ secrets.SECRET_C8YPASS }} + C8YUSERNAME: ${{ secrets.SECRET_C8YUSERNAME }} + C8YDEVICE: ${{ secrets.SECRET_C8YDEVICE_OFFSITE_ALL }} + C8YTENANT: ${{secrets.SECRET_C8YTENANT}} + C8YDEVICEID: ${{ secrets.SECRET_C8YDEVICEID_OFFSITE_ALL }} + TEBASEDIR: /home/pi/actions-runner/_work/thin-edge.io/thin-edge.io/ + EXAMPLEDIR: /home/pi/examples + C8YURL: https://thin-edge-io.eu-latest.cumulocity.com + + - name: Run all plugin tests + continue-on-error: true + run: bash ./ci/ci_run_all_plugin_tests.sh + env: + C8YPASS: ${{ secrets.SECRET_C8YPASS }} + C8YUSERNAME: ${{ secrets.SECRET_C8YUSERNAME }} + C8YDEVICE: ${{ secrets.SECRET_C8YDEVICE_OFFSITE_ALL }} + C8YTENANT: ${{secrets.SECRET_C8YTENANT}} + C8YDEVICEID: ${{ secrets.SECRET_C8YDEVICEID_OFFSITE_ALL }} + TEBASEDIR: /home/pi/actions-runner/_work/thin-edge.io/thin-edge.io/ + EXAMPLEDIR: /home/pi/examples + C8YURL: https://thin-edge-io.eu-latest.cumulocity.com + + - name: Run all sm tests + continue-on-error: true + run: bash ./ci/ci_run_all_sm_tests.sh + env: + C8YPASS: ${{ secrets.SECRET_C8YPASS }} + C8YUSERNAME: ${{ secrets.SECRET_C8YUSERNAME }} + C8YDEVICE: ${{ secrets.SECRET_C8YDEVICE_OFFSITE_ALL }} + C8YTENANT: ${{secrets.SECRET_C8YTENANT}} + C8YDEVICEID: ${{ secrets.SECRET_C8YDEVICEID_OFFSITE_ALL }} + TEBASEDIR: /home/pi/actions-runner/_work/thin-edge.io/thin-edge.io/ + EXAMPLEDIR: /home/pi/examples + C8YURL: https://thin-edge-io.eu-latest.cumulocity.com + + - name: upload results as zip + # https://github.com/marketplace/actions/upload-a-build-artifact + uses: actions/upload-artifact@v2 + with: + name: offsite_results_${{ github.run_number }} + path: tests/ + |