summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorRina Fujino <18257209+rina23q@users.noreply.github.com>2022-06-29 13:39:34 +0200
committerRina Fujino <18257209+rina23q@users.noreply.github.com>2022-06-29 13:39:34 +0200
commit6d919bda3705c54c6cf1eacb4650c3414d0d6d06 (patch)
tree8908009dbb15ec84ba481c3286cf8bc386a60392 /.github
parent9b8d8c8ecb081176350adefb9d3d2d468ba625d5 (diff)
Refactor ci_pipeline workflow
Reduce lines of workflow. - Remove unnecessary steps - Use matrix for self-hosted RPis names Improve the readability of workflow. - Separate "cleaning up RPis" part from the installation job - Change the order of jobs - Rename some job/step names Signed-off-by: Rina Fujino <18257209+rina23q@users.noreply.github.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci_pipeline.yml1101
1 files changed, 174 insertions, 927 deletions
diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml
index 1783ef52..bd5448d9 100644
--- a/.github/workflows/ci_pipeline.yml
+++ b/.github/workflows/ci_pipeline.yml
@@ -6,8 +6,6 @@ name: ci_pipeline
# a,b,c,d that we use to select a runner.
#
# TODO: Reduce complexity by moving functionality to bash scripts
-# TODO: Think about automated generation of this workflow, there is
-# duplicated code, especially in the later sections
# TODO: Smoke testing on Azure is disabled, we should check if it works out
# with 4 runners in parallel or enable only one
@@ -20,124 +18,14 @@ env:
CARGO_TERM_COLOR: always
jobs:
- cargo-fmt:
- name: Run cargo fmt
+ build-amd64:
+ name: Build for amd64
runs-on: Ubuntu-20.04
-
- steps:
- - name: Checkout
- uses: actions/checkout@v2
-
- - name: Cargo fmt --version
- uses: actions-rs/cargo@v1
- # https://github.com/marketplace/actions/rust-cargo
- with:
- command: fmt
- args: --version
-
- - name: Cargo fmt
- uses: actions-rs/cargo@v1
- # https://github.com/marketplace/actions/rust-cargo
- with:
- command: fmt
- args: -- --check
-
- python-black:
- name: Python static checks
- runs-on: Ubuntu-20.04
-
- steps:
- - name: Checkout
- uses: actions/checkout@v2
-
- - name: Run black
- uses: rickstaa/action-black@v1
- with:
- black_args: ". --check"
-
- cargo-clippy:
- name: Run cargo clippy
- runs-on: Ubuntu-20.04
-
- steps:
- - name: Checkout
- uses: actions/checkout@v2
-
- - name: enable toolchain via github action
- uses: actions-rs/toolchain@v1
- with:
- toolchain: 1.58.1
- components: rustfmt, clippy
- override: true
-
- - name: Enable cache
- # https://github.com/marketplace/actions/rust-cache
- uses: Swatinem/rust-cache@v1
-
- - name: Cargo clippy --version
- uses: actions-rs/cargo@v1
- # https://github.com/marketplace/actions/rust-cargo
- with:
- toolchain: 1.58.1
- command: clippy
- args: --version
-
- - name: Cargo clippy
- uses: actions-rs/cargo@v1
- # https://github.com/marketplace/actions/rust-cargo
- with:
- toolchain: 1.58.1
- command: clippy
-
- cargo-test:
- name: Run cargo test
- runs-on: Ubuntu-20.04
-
steps:
- name: Checkout
uses: actions/checkout@v2
- - name: enable toolchain via github action
- uses: actions-rs/toolchain@v1
- with:
- toolchain: 1.58.1
- override: true
-
- - name: Enable cache
- # https://github.com/marketplace/actions/rust-cache
- uses: Swatinem/rust-cache@v1
-
- - name: Cargo version
- uses: actions-rs/cargo@v1
- # https://github.com/marketplace/actions/rust-cargo
- with:
- command: version
-
- - name: Cargo build dummy plugin
- uses: actions-rs/cargo@v1
- # https://github.com/marketplace/actions/rust-cargo
- with:
- command: build
- args: -p tedge_dummy_plugin
-
- - name: Cargo test
- uses: actions-rs/cargo@v1
- # https://github.com/marketplace/actions/rust-cargo
- with:
- command: test
- args: --no-fail-fast
-
-
-###############################################################################
-
- build_amd64:
- name: Build tedge and mapper Debian packages for amd64
- runs-on: Ubuntu-20.04
- steps:
- - name: Checkout
- uses: actions/checkout@v2
-
- - name: enable toolchain via github action
+ - name: Enable toolchain via github action
# https://github.com/actions-rs/toolchain
uses: actions-rs/toolchain@v1
with:
@@ -211,13 +99,6 @@ jobs:
command: deb
args: -p c8y_configuration_plugin
- - name: build sawtooth-publisher for amd64
- uses: actions-rs/cargo@v1
- # https://github.com/marketplace/actions/rust-cargo
- with:
- command: build
- args: --release -p sawtooth_publisher
-
- name: Upload artifacts as zip
# https://github.com/marketplace/actions/upload-a-build-artifact
uses: actions/upload-artifact@v2
@@ -225,29 +106,105 @@ jobs:
name: debian-packages-amd64
path: target/debian/*.deb
- - name: upload amd64 sawtooth-publisher as zip
- # https://github.com/marketplace/actions/upload-a-build-artifact
- uses: actions/upload-artifact@v2
+#################################################################################
+
+ install-and-use-amd64:
+ name: Install artifacts on amd64
+ runs-on: Ubuntu-20.04
+ needs: build-amd64
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Download release artifacts
+ uses: actions/download-artifact@v3
+ # https://github.com/marketplace/actions/download-a-build-artifact
with:
- name: sawtooth_publisher_amd64
- path: target/release/sawtooth_publisher
+ name: debian-packages-amd64
+ path: debian-package_unpack
- - name: Build tedge_dummy_plugin
+ - name: install mosquitto
+ run: sudo apt-get --assume-yes install mosquitto
+
+ - name: install libmosquitto1
+ run: sudo apt-get --assume-yes install libmosquitto1
+
+ - name: install collectd-core
+ run: sudo apt-get --assume-yes install collectd-core
+
+ - name: install tedge package
+ run: sudo dpkg -i ./debian-package_unpack/tedge_0.*_amd64.deb
+
+ - name: install tedge mapper package
+ run: sudo dpkg -i ./debian-package_unpack/tedge_mapper_*_amd64.deb
+
+ - name: install tedge agent package
+ run: sudo dpkg -i ./debian-package_unpack/tedge_agent_*_amd64.deb
+
+ - name: install tedge watchdog package
+ run: sudo dpkg -i ./debian-package_unpack/tedge_watchdog_*_amd64.deb
+
+ - name: install tedge plugin packages
+ run: sudo dpkg -i ./debian-package_unpack/tedge_*_plugin_*_amd64.deb
+
+ - name: install c8y plugin packages
+ run: sudo dpkg -i ./debian-package_unpack/c8y_*_plugin_*_amd64.deb
+
+ - name: Run tedge help
+ run: tedge --help
+
+#################################################################################
+
+ cargo-test-features-amd64:
+ name: Run cargo test features
+ runs-on: Ubuntu-20.04
+ needs: build-amd64
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Enable toolchain via github action
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: 1.58.1
+ override: true
+
+ - name: Enable cache
+ # https://github.com/marketplace/actions/rust-cache
+ uses: Swatinem/rust-cache@v1
+
+ - name: Cargo test features (compile)
+ # Compile in advance to avoid that cargo compiles during the test run
+ # this seems to have an impact on some tests as the timing differs
uses: actions-rs/cargo@v1
# https://github.com/marketplace/actions/rust-cargo
with:
+ command: test
+ args: --verbose --no-run --features integration-test
+
+ - name: Cargo build dummy plugin
+ uses: actions-rs/cargo@v1
+ with:
command: build
- args: --release -p tedge_dummy_plugin
+ args: -p tedge_dummy_plugin
- - name: upload dummy-plugin
- # https://github.com/marketplace/actions/upload-a-build-artifact
- uses: actions/upload-artifact@v2
+ # 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:
- name: tedge_dummy_plugin_amd64
- path: target/release/tedge_dummy_plugin
+ command: test
+ args: --verbose --features integration-test,requires-sudo -- \
+ --skip sending_and_receiving_a_message
+
+##################################################################################
- build_matrix_arm:
- name: Build tedge and mapper Debian for armv7
+ build-matrix-arm:
+ name: Build for ${{ matrix.target }}
runs-on: Ubuntu-20.04
strategy:
matrix:
@@ -262,10 +219,10 @@ jobs:
]
steps:
- - name: checkout
+ - name: Checkout
uses: actions/checkout@v2
- - name: enable toolchain via github action
+ - name: Enable toolchain via github action
# https://github.com/actions-rs/toolchain
uses: actions-rs/toolchain@v1
with:
@@ -291,7 +248,7 @@ jobs:
command: install
args: cargo-strip
- - name: build cross release for target
+ - name: Build for ${{ matrix.target }}
uses: actions-rs/cargo@v1
# https://github.com/marketplace/actions/rust-cargo
with:
@@ -431,165 +388,21 @@ jobs:
#################################################################################
- install-and-use-amd64:
- runs-on: Ubuntu-20.04
- needs: [build_amd64]
-
- steps:
- - name: checkout
- uses: actions/checkout@v2
-
- - uses: actions/download-artifact@v3
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- name: debian-packages-amd64
- path: debian-package_unpack
-
- - name: Workaround Stop collectd mapper
- run: sudo systemctl stop tedge-mapper-collectd
- continue-on-error: true
-
- - name: disconnect c8y
- run: sudo tedge disconnect c8y
- # We need to continue when there is no tedge already installed
- continue-on-error: true
-
- - name: disconnect az
- run: sudo tedge disconnect az
- # We need to continue when there is no tedge already installed
- continue-on-error: true
-
- - name: purge
- run: sudo dpkg -P c8y_configuration_plugin tedge_agent c8y_log_plugin tedge_mapper tedge_apt_plugin tedge_apama_plugin tedge_watchdog tedge mosquitto libmosquitto1 collectd-core
-
- - name: install mosquitto
- run: sudo apt-get --assume-yes install mosquitto
-
- - name: install libmosquitto1
- run: sudo apt-get --assume-yes install libmosquitto1
-
- - name: install collectd-core
- run: sudo apt-get --assume-yes install collectd-core
-
- - name: install tedge package
- run: sudo dpkg -i ./debian-package_unpack/tedge_0.*_amd64.deb
-
- - name: install tedge mapper package
- run: sudo dpkg -i ./debian-package_unpack/tedge_mapper_*_amd64.deb
-
- - name: install tedge agent package
- run: sudo dpkg -i ./debian-package_unpack/tedge_agent_*_amd64.deb
-
- - name: install tedge watchdog package
- run: sudo dpkg -i ./debian-package_unpack/tedge_watchdog_*_amd64.deb
-
- - name: install tedge plugin packages
- run: sudo dpkg -i ./debian-package_unpack/tedge_*_plugin_*_amd64.deb
-
- - name: install c8y plugin packages
- run: sudo dpkg -i ./debian-package_unpack/c8y_*_plugin_*_amd64.deb
-
- - name: run tedge help
- run: tedge --help
-
- # For Analytics: 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"
-
- cargo-test-features:
- name: Run cargo test features
- runs-on: Ubuntu-20.04
- needs: install-and-use-amd64
+ clean-up-rpi-matrix:
+ strategy:
+ matrix:
+ rpi: [ m32sd10a, m32sd10b, m32sd10c, m32sd10d ]
+ runs-on:
+ - self-hosted
+ - Linux
+ - ARM
+ - offsite_${{ matrix.rpi }}
+ needs: build-arm-matrix
steps:
- name: Checkout
uses: actions/checkout@v2
- - name: enable toolchain via github action
- uses: actions-rs/toolchain@v1
- with:
- toolchain: 1.58.1
- override: true
-
- - name: Enable cache
- # https://github.com/marketplace/actions/rust-cache
- uses: Swatinem/rust-cache@v1
-
- - uses: actions/download-artifact@v3
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- name: debian-packages-amd64
- path: debian-package_unpack
-
- - name: install mosquitto
- run: sudo apt-get --assume-yes install mosquitto
-
- - name: install libmosquitto1
- run: sudo apt-get --assume-yes install libmosquitto1
-
- - name: install collectd-core
- run: sudo apt-get --assume-yes install collectd-core
-
- - name: install tedge package
- run: sudo dpkg -i ./debian-package_unpack/tedge_0.*_amd64.deb
-
- - name: install tedge mapper package
- run: sudo dpkg -i ./debian-package_unpack/tedge_mapper_*_amd64.deb
-
- - name: install tedge agent package
- run: sudo dpkg -i ./debian-package_unpack/tedge_agent_*_amd64.deb
-
- - name: install tedge watchdog package
- run: sudo dpkg -i ./debian-package_unpack/tedge_watchdog_*_amd64.deb
-
- - name: install tedge plugin packages
- run: sudo dpkg -i ./debian-package_unpack/tedge_*_plugin_*_amd64.deb
-
- - name: install c8y plugin packages
- run: sudo dpkg -i ./debian-package_unpack/c8y_*_plugin_*_amd64.deb
-
- - name: Cargo test features (compile)
- # Compile in advance to avoid that cargo compiles during the test run
- # this seems to have an impact on some tests as the timing differs
- uses: actions-rs/cargo@v1
- # https://github.com/marketplace/actions/rust-cargo
- with:
- command: test
- args: --verbose --no-run --features integration-test
-
- - name: Cargo build dummy plugin
- uses: actions-rs/cargo@v1
- with:
- command: build
- args: -p tedge_dummy_plugin
-
- # 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
- args: --verbose --features integration-test,requires-sudo -- \
- --skip sending_and_receiving_a_message
-
-#################################################################################
-
- install-and-use-rpi_m32sd10a:
- runs-on: [self-hosted, Linux, ARM, offsite_m32sd10a]
- needs: [build_matrix_arm]
-
- steps:
- - name: checkout
- uses: actions/checkout@v2
-
- - uses: actions/download-artifact@v3
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- name: debian-packages-armv7-unknown-linux-gnueabihf
- path: debian-package_unpack
-
- name: Workaround Stop collectd mapper
run: sudo systemctl stop tedge-mapper-collectd
continue-on-error: true
@@ -611,133 +424,30 @@ jobs:
- name: purge
run: sudo dpkg -P c8y_configuration_plugin tedge_agent c8y_log_plugin tedge_mapper tedge_apt_plugin tedge_apama_plugin tedge_watchdog tedge mosquitto-clients mosquitto libmosquitto1 collectd-core collectd
- - name: install mosquitto
- run: sudo apt-get --assume-yes install mosquitto
-
- - name: install libmosquitto1
- run: sudo apt-get --assume-yes install libmosquitto1
-
- - name: install mosquitto-clients
- run: sudo apt-get --assume-yes install mosquitto-clients
-
- - name: install collectd-core
- run: sudo apt-get --assume-yes install collectd-core collectd
-
- - name: install tedge package
- run: sudo dpkg -i ./debian-package_unpack/tedge_0.*_armhf.deb
-
- - name: install tedge mapper package
- run: sudo dpkg -i ./debian-package_unpack/tedge_mapper_*_armhf.deb
-
- - name: install tedge agent package
- run: sudo dpkg -i ./debian-package_unpack/tedge_agent_*_armhf.deb
-
- - name: install tedge watchdog package
- run: sudo dpkg -i ./debian-package_unpack/tedge_watchdog_*_armhf.deb
-
- - name: install tedge plugin packages
- run: sudo dpkg -i ./debian-package_unpack/tedge_*_plugin_*_armhf.deb
-
- - name: install c8y plugin packages
- run: sudo dpkg -i ./debian-package_unpack/c8y_*_plugin_*_armhf.deb
-
- - name: run tedge help
- run: tedge --help
-
- - name: configure collectd
- run: sudo cp "/etc/tedge/contrib/collectd/collectd.conf" "/etc/collectd/collectd.conf"
-
- - uses: actions/download-artifact@v3
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- name: sawtooth_publisher_armv7-unknown-linux-gnueabihf
- path: /home/pi/examples
-
- - name: chmod publisher
- run: chmod +x /home/pi/examples/sawtooth_publisher
-
- - uses: actions/download-artifact@v3
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- name: tedge_dummy_plugin_armv7-unknown-linux-gnueabihf
- path: /home/pi/tedge_dummy_plugin
-
- - name: chmod dummy_plugin
- run: chmod +x /home/pi/tedge_dummy_plugin/tedge_dummy_plugin
-
- - name: Configure Bridge
- run: ./ci/configure_bridge.sh
- env:
- C8YPASS: ${{ secrets.SECRET_C8YPASS }}
- C8YUSERNAME: ${{ secrets.SECRET_C8YUSERNAME }}
- C8YTENANT: ${{secrets.SECRET_C8YTENANT}}
- C8YDEVICE: m32sd10a
- 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
- IOTHUBNAME: ${{ secrets.IOTHUBNAME }}
-
- - name: Run smoke test for Cumulocity
- run: ./ci/ci_smoke_test_c8y.sh
- env:
- C8YPASS: ${{ secrets.SECRET_C8YPASS }}
- C8YUSERNAME: ${{ secrets.SECRET_C8YUSERNAME }}
- C8YTENANT: ${{secrets.SECRET_C8YTENANT}}
- C8YDEVICE: m32sd10a
- 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
- IOTHUBNAME: ${{ secrets.IOTHUBNAME }}
-
-# Run tests for Azure
-# Enable this, when we have decided about how many runners we use
-#
-# - name: Run Smoke Test for Azure
-# run: ./ci/ci_smoke_test_az.sh
-# env:
-# SASKEYQUEUE: ${{ secrets.SASKEYQUEUE }}
-# SASKEYIOTHUB: ${{ secrets.SASKEYIOTHUB }}
-# AZUREENDPOINT: ${{ secrets.AZUREENDPOINT }}
-# AZUREEVENTHUB: ${{ secrets.AZUREEVENTHUB }}
-# IOTHUBNAME: ${{ secrets.IOTHUBNAME }}
-
#################################################################################
- install-and-use-rpi_m32sd10b:
- runs-on: [self-hosted, Linux, ARM, offsite_m32sd10b]
- needs: [build_matrix_arm]
+ install-and-use-rpi-matrix:
+ strategy:
+ matrix:
+ rpi: [ m32sd10a, m32sd10b, m32sd10c, m32sd10d ]
+ runs-on:
+ - self-hosted
+ - Linux
+ - ARM
+ - offsite_${{ matrix.rpi }}
+ needs: clean-up-rpi-matrix
steps:
- - name: checkout
+ - name: Checkout
uses: actions/checkout@v2
- - uses: actions/download-artifact@v3
+ - name: Download release artifacts
+ uses: actions/download-artifact@v3
# https://github.com/marketplace/actions/download-a-build-artifact
with:
name: debian-packages-armv7-unknown-linux-gnueabihf
path: debian-package_unpack
- - name: Workaround Stop collectd mapper
- run: sudo systemctl stop tedge-mapper-collectd
- continue-on-error: true
-
- - name: disconnect c8y
- run: sudo tedge disconnect c8y
- # We need to continue when there is no tedge already installed
- continue-on-error: true
-
- - name: disconnect az
- run: sudo tedge disconnect az
- # We need to continue when there is no tedge already installed
- continue-on-error: true
-
- - name: Stop apama
- run: sudo systemctl stop apama
- continue-on-error: true
-
- - name: purge
- run: sudo dpkg -P c8y_configuration_plugin tedge_agent c8y_log_plugin tedge_mapper tedge_apt_plugin tedge_apama_plugin tedge_watchdog tedge mosquitto-clients mosquitto libmosquitto1 collectd-core collectd
-
- name: install mosquitto
run: sudo apt-get --assume-yes install mosquitto
@@ -768,10 +478,6 @@ jobs:
- name: install c8y plugin packages
run: sudo dpkg -i ./debian-package_unpack/c8y_*_plugin_*_armhf.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"
@@ -798,8 +504,8 @@ jobs:
env:
C8YPASS: ${{ secrets.SECRET_C8YPASS }}
C8YUSERNAME: ${{ secrets.SECRET_C8YUSERNAME }}
- C8YTENANT: ${{secrets.SECRET_C8YTENANT}}
- C8YDEVICE: m32sd10b
+ C8YTENANT: ${{ secrets.SECRET_C8YTENANT }}
+ C8YDEVICE: ${{ matrix.rpi }}
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
@@ -810,8 +516,8 @@ jobs:
env:
C8YPASS: ${{ secrets.SECRET_C8YPASS }}
C8YUSERNAME: ${{ secrets.SECRET_C8YUSERNAME }}
- C8YTENANT: ${{secrets.SECRET_C8YTENANT}}
- C8YDEVICE: m32sd10b
+ C8YTENANT: ${{ secrets.SECRET_C8YTENANT }}
+ C8YDEVICE: ${{ matrix.rpi }}
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
@@ -831,547 +537,88 @@ jobs:
#################################################################################
- install-and-use-rpi_m32sd10c:
- runs-on: [self-hosted, Linux, ARM, offsite_m32sd10c]
- needs: [build_matrix_arm]
+ system-test-offsite-matrix:
+ strategy:
+ matrix:
+ rpi: [ m32sd10a, m32sd10b, m32sd10c, m32sd10d ]
+ runs-on:
+ - self-hosted
+ - Linux
+ - ARM
+ - offsite_${{ matrix.rpi }}
+ needs: install-and-use-rpi-matrix
steps:
- - name: checkout
+ - name: Checkout
uses: actions/checkout@v2
- - uses: actions/download-artifact@v3
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- name: debian-packages-armv7-unknown-linux-gnueabihf
- path: debian-package_unpack
-
- - name: Workaround Stop collectd mapper
- run: sudo systemctl stop tedge-mapper-collectd
- continue-on-error: true
-
- - name: disconnect c8y
- run: sudo tedge disconnect c8y
- # We need to continue when there is no tedge already installed
- continue-on-error: true
-
- - name: disconnect az
- run: sudo tedge disconnect az
- # We need to continue when there is no tedge already installed
- continue-on-error: true
-
- - name: Stop apama
- run: sudo systemctl stop apama
+ - name: Run all Tests
+ run: bash ./ci/ci_run_all_tests.sh
continue-on-error: true
-
- - name: purge
- run: sudo dpkg -P c8y_configuration_plugin tedge_agent c8y_log_plugin tedge_mapper tedge_apt_plugin tedge_apama_plugin tedge_watchdog tedge mosquitto-clients mosquitto libmosquitto1 collectd-core collectd
-
- - name: install mosquitto
- run: sudo apt-get --assume-yes install mosquitto
-
- - name: install libmosquitto1
- run: sudo apt-get --assume-yes install libmosquitto1
-
- - name: install mosquitto-clients
- run: sudo apt-get --assume-yes install mosquitto-clients
-
- - name: install collectd-core
- run: sudo apt-get --assume-yes install collectd-core collectd
-
- - name: install tedge package
- run: sudo dpkg -i ./debian-package_unpack/tedge_0.*_armhf.deb
-
- - name: install tedge mapper package
- run: sudo dpkg -i ./debian-package_unpack/tedge_mapper_*_armhf.deb
-
- - name: install tedge agent package
- run: sudo dpkg -i ./debian-package_unpack/tedge_agent_*_armhf.deb
-
- - name: install tedge watchdog package
- run: sudo dpkg -i ./debian-package_unpack/tedge_watchdog_*_armhf.deb
-
- - name: install tedge plugin packages
- run: sudo dpkg -i ./debian-package_unpack/tedge_*_plugin_*_armhf.deb
-
- - name: install c8y plugin packages
- run: sudo dpkg -i ./debian-package_unpack/c8y_*_plugin_*_armhf.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"
-
- - uses: actions/download-artifact@v3
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- name: sawtooth_publisher_armv7-unknown-linux-gnueabihf
- path: /home/pi/examples
-
- - name: chmod publisher
- run: chmod +x /home/pi/examples/sawtooth_publisher
-
- - uses: actions/download-artifact@v3
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- name: tedge_dummy_plugin_armv7-unknown-linux-gnueabihf
- path: /home/pi/tedge_dummy_plugin
-
- - name: chmod dummy_plugin
- run: chmod +x /home/pi/tedge_dummy_plugin/tedge_dummy_plugin
-
- - name: Configure Bridge
- run: ./ci/configure_bridge.sh
+ if: true
env:
C8YPASS: ${{ secrets.SECRET_C8YPASS }}
C8YUSERNAME: ${{ secrets.SECRET_C8YUSERNAME }}
- C8YTENANT: ${{secrets.SECRET_C8YTENANT}}
- C8YDEVICE: m32sd10c
+ C8YDEVICE: ${{ matrix.rpi }}
+ C8YTENANT: ${{ secrets.SECRET_C8YTENANT }}
+ C8YURL: https://thin-edge-io.eu-latest.cumulocity.com
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
- IOTHUBNAME: ${{ secrets.IOTHUBNAME }}
- - name: Run smoke test for Cumulocity
- run: ./ci/ci_smoke_test_c8y.sh
+ - name: Run all plugin tests
+ run: bash ./ci/ci_run_all_plugin_tests.sh
+ continue-on-error: true
+ if: true
env:
C8YPASS: ${{ secrets.SECRET_C8YPASS }}
C8YUSERNAME: ${{ secrets.SECRET_C8YUSERNAME }}
- C8YTENANT: ${{secrets.SECRET_C8YTENANT}}
- C8YDEVICE: m32sd10c
+ C8YDEVICE: ${{ matrix.rpi }}
+ C8YTENANT: ${{ secrets.SECRET_C8YTENANT }}
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
- IOTHUBNAME: ${{ secrets.IOTHUBNAME }}
-
-# Run tests for Azure
-# Enable this, when we have decided about how many runners we use
-#
-# - name: Run Smoke Test for Azure
-# run: ./ci/ci_smoke_test_az.sh
-# env:
-# SASKEYQUEUE: ${{ secrets.SASKEYQUEUE }}
-# SASKEYIOTHUB: ${{ secrets.SASKEYIOTHUB }}
-# AZUREENDPOINT: ${{ secrets.AZUREENDPOINT }}
-# AZUREEVENTHUB: ${{ secrets.AZUREEVENTHUB }}
-# IOTHUBNAME: ${{ secrets.IOTHUBNAME }}
-
-#################################################################################
-
- install-and-use-rpi_m32sd10d:
- runs-on: [self-hosted, Linux, ARM, offsite_m32sd10d]
- needs: [build_matrix_arm]
- steps:
- - name: checkout
- uses: actions/checkout@v2
-
- - uses: actions/download-artifact@v3
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- name: debian-packages-armv7-unknown-linux-gnueabihf
- path: debian-package_unpack
-
- - name: Workaround Stop collectd mapper
- run: sudo systemctl stop tedge-mapper-collectd
- continue-on-error: true
-
- - name: disconnect c8y
- run: sudo tedge disconnect c8y
- # We need to continue when there is no tedge already installed
+ - name: Run all sm tests
+ run: bash ./ci/ci_run_all_sm_tests.sh
continue-on-error: true
-
- - name: disconnect az
- run: sudo tedge disconnect az
- # We need to continue when there is no tedge already installed
- continue-on-error: true
-
- - name: Stop apama
- run: sudo systemctl stop apama
- continue-on-error: true
-
- - name: purge
- run: sudo dpkg -P c8y_configuration_plugin tedge_agent c8y_log_plugin tedge_mapper tedge_apt_plugin tedge_apama_plugin tedge_watchdog tedge mosquitto-clients mosquitto libmosquitto1 collectd-core collectd
-
- - name: install mosquitto
- run: sudo apt-get --assume-yes install mosquitto
-
- - name: install libmosquitto1
- run: sudo apt-get --assume-yes install libmosquitto1
-
- - name: install mosquitto-clients
- run: sudo apt-get --assume-yes install mosquitto-clients
-
- - name: install collectd-core
- run: sudo apt-get --assume-yes install collectd-core collectd
-
- - name: install tedge package
- run: sudo dpkg -i ./debian-package_unpack/tedge_0.*_armhf.deb
-
- - name: install tedge mapper package
- run: sudo dpkg -i ./debian-package_unpack/tedge_mapper_*_armhf.deb
-
- - name: install tedge agent package
- run: sudo dpkg -i ./debian-package_unpack/tedge_agent_*_armhf.deb
-
- - name: install tedge watchdog package
- run: sudo dpkg -i ./debian-package_unpack/tedge_watchdog_*_armhf.deb
-
- - name: install tedge plugin packages
- run: sudo dpkg -i ./debian-package_unpack/tedge_*_plugin_*_armhf.deb
-
- - name: install c8y plugin packages
- run: sudo dpkg -i ./debian-package_unpack/c8y_*_plugin_*_armhf.deb
-
- - name: run tedge help
- run: tedge --help
-
- - name: configure collectd
- run: sudo cp "/etc/tedge/contrib/collectd/collectd.conf" "/etc/collectd/collectd.conf"
-
- - uses: actions/download-artifact@v3
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- name: sawtooth_publisher_armv7-unknown-linux-gnueabihf
- path: /home/pi/examples
-
- - name: chmod publisher
- run: chmod +x /home/pi/examples/sawtooth_publisher
-
- - uses: actions/download-artifact@v3
- # https://github.com/marketplace/actions/download-a-build-artifact
- with:
- name: tedge_dummy_plugin_armv7-unknown-linux-gnueabihf
- path: /home/pi/tedge_dummy_plugin
-
- - name: chmod dummy_plugin
- run: chmod +x /home/pi/tedge_dummy_plugin/tedge_dummy_plugin
-
- - name: Configure Bridge
- run: ./ci/configure_bridge.sh
+ if: true
env:
C8YPASS: ${{ secrets.SECRET_C8YPASS }}
C8YUSERNAME: ${{ secrets.SECRET_C8YUSERNAME }}
- C8YTENANT: ${{secrets.SECRET_C8YTENANT}}
- C8YDEVICE: m32sd10d
+ C8YDEVICE: ${{ matrix.rpi }}
+ C8YTENANT: ${{ secrets.SECRET_C8YTENANT }}
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
- IOTHUBNAME: ${{ secrets.IOTHUBNAME }}
- - name: Run smoke test for Cumulocity
- run: ./ci/ci_smoke_test_c8y.sh
+ - name: Run all statistics tests
+ run: bash ./ci/ci_run_statistics.sh
+ continue-on-error: true
+ if: true
env:
C8YPASS: ${{ secrets.SECRET_C8YPASS }}
C8YUSERNAME: ${{ secrets.SECRET_C8YUSERNAME }}
- C8YTENANT: ${{secrets.SECRET_C8YTENANT}}</