summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRina Fujino <18257209+rina23q@users.noreply.github.com>2021-10-04 12:59:39 +0200
committerGitHub <noreply@github.com>2021-10-04 12:59:39 +0200
commita5a48b73b0c975052ebdfdc0aae95e4eea9256c6 (patch)
tree4cd1a31553adf656045521cb611ff06cc5f1f974
parent1b094ad73a6c81503d189ff0fcc6998e89009b79 (diff)
Revert "Run all tests on commit (experimental) (#462)" (#464)
-rw-r--r--.github/workflows/commit-workflow-all.yml332
-rwxr-xr-xci/ci_run_all_plugin_tests.sh31
-rwxr-xr-xci/ci_run_all_sm_tests.sh33
-rwxr-xr-xci/ci_run_all_tests.sh1
4 files changed, 0 insertions, 397 deletions
diff --git a/.github/workflows/commit-workflow-all.yml b/.github/workflows/commit-workflow-all.yml
deleted file mode 100644
index 1619f60a..00000000
--- a/.github/workflows/commit-workflow-all.yml
+++ /dev/null
@@ -1,332 +0,0 @@
-name: commit-workflow-allinone
-
-on:
- push:
- branches: [ main ]
- workflow_dispatch:
- branches: [ main ]
- pull_request:
- branches: [ main ]
-
-env:
- CARGO_TERM_COLOR: always
-
-jobs:
-
-# Build Workflow
-
- build-matrix-arm:
- name: Build tedge and mapper Debian for armv7
- runs-on: Ubuntu-20.04
- strategy:
- matrix:
- target:
- [
- armv7-unknown-linux-gnueabihf,
- ]
-
- steps:
- - name: checkout
- uses: actions/checkout@v2
-
- - name: enable toolchain via github action
- # https://github.com/actions-rs/toolchain
- uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- target: ${{ matrix.target }}
- override: true
-
- - name: Enable cache
- # https://github.com/marketplace/actions/rust-cache
- uses: Swatinem/rust-cache@v1
-
- - name: install cargo-deb
- uses: actions-rs/cargo@v1
- # https://github.com/marketplace/actions/rust-cargo
- with:
- command: install
- args: cargo-deb
-
- - name: install cargo-strip
- uses: actions-rs/cargo@v1
- # https://github.com/marketplace/actions/rust-cargo
- with:
- command: install
- args: cargo-strip
-
- - name: build cross release for target
- uses: actions-rs/cargo@v1
- # https://github.com/marketplace/actions/rust-cargo
- with:
- use-cross: true
- command: build
- args: --release --target=${{ matrix.target }}
-
- # armv7 uses `arm-linux-gnueabihf-strip`; aarch64 uses `aarch64-linux-gnu-strip`
- # It appears `aarch64-linux-gnu-strip` seems to work explicitly on other arm bins but not other way around.
- - name: Install binutils to add `strip` for striping arm binaries
- run: sudo apt-get --assume-yes install binutils-arm-linux-gnueabihf binutils-aarch64-linux-gnu
-
- - name: Strip tedge
- run: arm-linux-gnueabihf-strip target/${{ matrix.target }}/release/tedge || aarch64-linux-gnu-strip target/${{ matrix.target }}/release/tedge
-
- - name: Strip tedge_mapper
- run: arm-linux-gnueabihf-strip target/${{ matrix.target }}/release/tedge_mapper || aarch64-linux-gnu-strip target/${{ matrix.target }}/release/tedge_mapper
-
- - name: Strip tedge_agent
- run: arm-linux-gnueabihf-strip target/${{ matrix.target }}/release/tedge_agent || aarch64-linux-gnu-strip target/${{ matrix.target }}/release/tedge_agent
-
- - name: Strip tedge_apt_plugin
- run: arm-linux-gnueabihf-strip target/${{ matrix.target }}/release/tedge_apt_plugin || aarch64-linux-gnu-strip target/${{ matrix.target }}/release/tedge_apt_plugin
-
- - name: build tedge debian package for target
- uses: actions-rs/cargo@v1
- # https://github.com/marketplace/actions/rust-cargo
- with:
- command: deb
- args: -p tedge --no-strip --no-build --target=${{ matrix.target }}
-
- - name: build tedge_mapper debian package for target
- uses: actions-rs/cargo@v1
- # https://github.com/marketplace/actions/rust-cargo
- with:
- command: deb
- args: -p tedge_mapper --no-strip --no-build --target=${{ matrix.target }}
-
- - name: build tedge_agent debian package for target
- uses: actions-rs/cargo@v1
- # https://github.com/marketplace/actions/rust-cargo
- with:
- command: deb
- args: -p tedge_agent --no-strip --no-build --target=${{ matrix.target }}
-
- - name: build tedge_apt_plugin debian package for target
- uses: actions-rs/cargo@v1
- # https://github.com/marketplace/actions/rust-cargo
- with:
- command: deb
- args: -p tedge_apt_plugin --no-strip --no-build --target=${{ matrix.target }}
-
- - name: build examples
- uses: actions-rs/cargo@v1
- # https://github.com/marketplace/actions/rust-cargo
- with:
- use-cross: true
- command: build
- args: --release --examples --target=${{ matrix.target }}
-
- - name: Strip workaround sawtooth_publisher
- run: arm-linux-gnueabihf-strip target/${{ matrix.target }}/release/examples/sawtooth_publisher || aarch64-linux-gnu-strip target/${{ matrix.target }}/release/examples/sawtooth_publisher
-
- - uses: actions/upload-artifact@v2
- # https://github.com/marketplace/actions/upload-a-build-artifact
- with:
- # TODO : Avoid hardcoded versions
- name: tedge_0.3.2_armhf.deb
- path: target/armv7-unknown-linux-gnueabihf/debian/tedge_0.3.2_armhf.deb
-
- - uses: actions/upload-artifact@v2
- # https://github.com/marketplace/actions/upload-a-build-artifact
- with:
- # TODO : Avoid hardcoded versions
- name: tedge_apt_plugin_0.3.2_armhf.deb
- path: target/armv7-unknown-linux-gnueabihf/debian/tedge_apt_plugin_0.3.2_armhf.deb
-
- - uses: actions/upload-artifact@v2
- # https://github.com/marketplace/actions/upload-a-build-artifact
- with:
- # TODO : Avoid hardcoded versions
- name: tedge_agent_0.3.2_armhf.deb
- path: target/armv7-unknown-linux-gnueabihf/debian/tedge_agent_0.3.2_armhf.deb
-
- - uses: actions/upload-artifact@v2
- # https://github.com/marketplace/actions/upload-a-build-artifact
- with:
- # TODO : Avoid hardcoded versions
- name: tedge_mapper_0.3.2_armhf.deb
- path: target/armv7-unknown-linux-gnueabihf/debian/tedge_mapper_0.3.2_armhf.deb
-
- - uses: actions/upload-artifact@v2
- # https://github.com/marketplace/actions/upload-a-build-artifact
- with:
- name: sawtooth_publisher
- path: target/armv7-unknown-linux-gnueabihf/release/examples/sawtooth_publisher
-
-
-# Integration Test Workflow
-
- cargo-test-features:
- name: Run cargo test features
- runs-on: Ubuntu-20.04
-
- steps:
- - name: Checkout
- uses: actions/checkout@v2
-
- - name: Enable cache
- # https://github.com/marketplace/actions/rust-cache
- uses: Swatinem/rust-cache@v1
-
- - name: Cargo test features (compile)
- # If we do not compile in advance the timing in the test run
- # will not work out as some parts are still compiling during the run
- uses: actions-rs/cargo@v1
- # https://github.com/marketplace/actions/rust-cargo
- with:
- command: test
- args: --verbose --no-run --features integration-test
-
- # To run the test for features here is kind of experimental
- # they could fail if GitHub blocks external connections.
- # It seems like they rarely do.
- - name: Cargo test features
- uses: actions-rs/cargo@v1
- # https://github.com/marketplace/actions/rust-cargo
- with:
- command: test
- # TODO Update this arguments
- args: --verbose --features integration-test -- --skip sending_and_receiving_a_message
-
- install-and-use-rpi-offsite:
- needs: [build-matrix-arm]
- runs-on: [self-hosted, Linux, ARM, offsiteall ]
-
- steps:
- - name: checkout
- uses: actions/checkout@v2
-
- - uses: actions/download-artifact@v2
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- # TODO : Avoid hardcoded versions
- name: tedge_0.3.2_armhf.deb
- path: target/armv7-unknown-linux-gnueabihf/debian/
-
- - uses: actions/download-artifact@v2
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- # TODO : Avoid hardcoded versions
- name: tedge_apt_plugin_0.3.2_armhf.deb
- path: target/armv7-unknown-linux-gnueabihf/debian/
-
- - uses: actions/download-artifact@v2
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- # TODO : Avoid hardcoded versions
- name: tedge_agent_0.3.2_armhf.deb
- path: target/armv7-unknown-linux-gnueabihf/debian/
-
- - uses: actions/download-artifact@v2
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- # TODO : Avoid hardcoded versions
- name: tedge_mapper_0.3.2_armhf.deb
- path: target/armv7-unknown-linux-gnueabihf/debian/
-
- - uses: actions/download-artifact@v2
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- name: sawtooth_publisher
- path: target/armv7-unknown-linux-gnueabihf/release/examples/
-
- - name: purge packages
- run: sudo dpkg -P mosquitto tedge tedge_mapper tedge_apt_plugin collectd-core libmosquitto1
- continue-on-error: true
-
- - name: install packages
- run: sudo apt-get --assume-yes install mosquitto libmosquitto1 collectd-core
-
- - name: ls-lah
- run: ls -lah
-
- - name: ls-lah-debian
- run: ls -lah target/armv7-unknown-linux-gnueabihf/debian/
-
- - name: install packages
- # TODO : Avoid hardcoded versions
- run: cd target/armv7-unknown-linux-gnueabihf/debian/; sudo dpkg -i tedge_0.3.2_armhf.deb tedge_apt_plugin_0.3.2_armhf.deb tedge_agent_0.3.2_armhf.deb tedge_mapper_0.3.2_armhf.deb
-
- # 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: delete old publisher
- run: rm -f /home/pi/examples/sawtooth_publisher
-
- - name: move publisher
- run: mv target/armv7-unknown-linux-gnueabihf/release/examples/sawtooth_publisher /home/pi/examples/
-
- - 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 }}
- EXAMPLEDIR: /home/pi/examples
- TEBASEDIR: /home/pi/actions-runner/_work/thin-edge.io/thin-edge.io/
-
-
-# System Test Workflow
-
- system-test_offsite:
- needs: [install-and-use-rpi-offsite]
- runs-on: [self-hosted, Linux, ARM, offsiteall]
- #continue-on-error: true
-
- steps:
-
- - name: checkout
- uses: actions/checkout@v2
-
- - name: Run all Tests
- run: bash ./ci/ci_run_all_tests.sh
- env:
- C8YPASS: ${{ secrets.SECRET_C8YPASS }}
- C8YUSERNAME: ${{ secrets.SECRET_C8YUSERNAME }}
- C8YTENNANT: ${{secrets.SECRET_C8YTENANT}}
- C8YDEVICE: ${{ secrets.SECRET_C8YDEVICE_OFFSITE_ALL }}
- C8YTENANT: ${{secrets.SECRET_C8YTENANT}}
- C8YDEVICEID: ${{ secrets.SECRET_C8YDEVICEID_OFFSITE_ALL }}
- TIMEZONE: 01:00
- 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
- run: bash ./ci/ci_run_all_plugin_tests.sh
- env:
- C8YPASS: ${{ secrets.SECRET_C8YPASS }}
- C8YUSERNAME: ${{ secrets.SECRET_C8YUSERNAME }}
- C8YTENNANT: ${{secrets.SECRET_C8YTENANT}}
- C8YDEVICE: ${{ secrets.SECRET_C8YDEVICE_OFFSITE_ALL }}
- C8YTENANT: ${{secrets.SECRET_C8YTENANT}}
- C8YDEVICEID: ${{ secrets.SECRET_C8YDEVICEID_OFFSITE_ALL }}
- TIMEZONE: 01:00
- TEBASEDIR: /home/pi/actions-runner/_work/thin-edge.io/thin-edge.io/
- EXAMPLEDIR: /home/pi/examples
-
- - name: Run all sm tests
- run: bash ./ci/ci_run_all_sm_tests.sh
- env:
- C8YPASS: ${{ secrets.SECRET_C8YPASS }}
- C8YUSERNAME: ${{ secrets.SECRET_C8YUSERNAME }}
- C8YTENNANT: ${{secrets.SECRET_C8YTENANT}}
- C8YDEVICE: ${{ secrets.SECRET_C8YDEVICE_OFFSITE_ALL }}
- C8YTENANT: ${{secrets.SECRET_C8YTENANT}}
- C8YDEVICEID: ${{ secrets.SECRET_C8YDEVICEID_OFFSITE_ALL }}
- TIMEZONE: 01:00
- TEBASEDIR: /home/pi/actions-runner/_work/thin-edge.io/thin-edge.io/
- EXAMPLEDIR: /home/pi/examples
-
- - name: upload results as zip
- # https://github.com/marketplace/actions/upload-a-build-artifact
- uses: actions/upload-artifact@v2
- with:
- name: results_${{ github.run_number }}
- path: tests/
diff --git a/ci/ci_run_all_plugin_tests.sh b/ci/ci_run_all_plugin_tests.sh
deleted file mode 100755
index c63f877c..00000000
--- a/ci/ci_run_all_plugin_tests.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/bash
-
-# Run all available system-tests.
-# Note: Needs a bash shell to run
-#
-# Expected environment variables to be set:
-# C8YPASS : Cumulocity password
-# C8YUSERNAME : Cumolocity username
-# C8YTENANT : Cumolocity tenant
-# C8YDEVICE : The device name
-# C8YDEVICEID : The device ID in Cumolocity
-# TIMEZONE : Your timezone (temporary)
-# TEBASEDIR : Base directory for the Thin-Edge repo
-# EXAMPLEDIR : The direcory of the sawtooth example
-# C8YURL : e.g. https://thin-edge-io.eu-latest.cumulocity.com
-
-set -e
-
-cd $TEBASEDIR
-
-# Check if clients are installed
-dpkg -s mosquitto-clients
-
-# Run all PySys tests
-
-python3 -m venv ~/env-pysys
-source ~/env-pysys/bin/activate
-pip3 install -r tests/requirements.txt
-cd tests/PySys/
-pysys.py run -v DEBUG 'apt_*' -XmyPlatform='container'
-deactivate
diff --git a/ci/ci_run_all_sm_tests.sh b/ci/ci_run_all_sm_tests.sh
deleted file mode 100755
index dcd7092b..00000000
--- a/ci/ci_run_all_sm_tests.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/bash
-
-# Run all available system-tests.
-# Note: Needs a bash shell to run
-#
-# Expected environment variables to be set:
-# C8YPASS : Cumulocity password
-# C8YUSERNAME : Cumolocity username
-# C8YTENANT : Cumolocity tenant
-# C8YDEVICE : The device name
-# C8YDEVICEID : The device ID in Cumolocity
-# TIMEZONE : Your timezone (temporary)
-# TEBASEDIR : Base directory for the Thin-Edge repo
-# EXAMPLEDIR : The direcory of the sawtooth example
-# C8YURL : e.g. https://thin-edge-io.eu-latest.cumulocity.com
-
-
-
-set -e
-
-cd $TEBASEDIR
-
-# Check if clients are installed
-dpkg -s mosquitto-clients
-
-# Run all PySys tests
-
-python3 -m venv ~/env-pysys
-source ~/env-pysys/bin/activate
-pip3 install -r tests/requirements.txt
-cd tests/PySys/
-pysys.py run -v DEBUG 'sm-apt-*' -XmyPlatform='specialcontainer'
-deactivate
diff --git a/ci/ci_run_all_tests.sh b/ci/ci_run_all_tests.sh
index 57983f37..22dfb1b2 100755
--- a/ci/ci_run_all_tests.sh
+++ b/ci/ci_run_all_tests.sh
@@ -12,7 +12,6 @@
# TIMEZONE : Your timezone (temporary)
# TEBASEDIR : Base directory for the Thin-Edge repo
# EXAMPLEDIR : The direcory of the sawtooth example
-# C8YURL : e.g. https://thin-edge-io.eu-latest.cumulocity.com
set -e