From 7fc806fa3841e0187d66ca9cc7c19e18002e12b5 Mon Sep 17 00:00:00 2001 From: Yakun Xu Date: Thu, 2 Feb 2023 07:10:14 +0800 Subject: [PATCH] [test] move tcplp tests into unit workflow (#8707) The tcplp test is not testing POSIX platform. This commit creates a new workflow unit to host this test. In future, we may put all unit tests in this workflow after automake support is removed. --- .github/workflows/posix.yml | 16 ---------- .github/workflows/unit.yml | 62 +++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/unit.yml diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index 16bed0ef35f..4be933219c4 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -124,22 +124,6 @@ jobs: with: name: cov-expects-linux-2 path: tmp/coverage.info - - tcplp-buffering: - runs-on: ubuntu-20.04 - steps: - - name: Harden Runner - uses: step-security/harden-runner@18bf8ad2ca49c14cbb28b91346d626ccfb00c518 # v2.1.0 - with: - egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs - - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - with: - submodules: true - - name: Build - run: make -C third_party/tcplp/lib/test/ - - name: Run - run: third_party/tcplp/lib/test/test_all thread-cert: runs-on: ubuntu-20.04 diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml new file mode 100644 index 00000000000..8df8e9243a0 --- /dev/null +++ b/.github/workflows/unit.yml @@ -0,0 +1,62 @@ +# +# Copyright (c) 2023, The OpenThread Authors. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +name: Unit + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + branches: + - 'main' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }} + cancel-in-progress: true + +permissions: # added using https://github.com/step-security/secure-workflows + contents: read + +jobs: + + tcplp-buffering: + runs-on: ubuntu-20.04 + steps: + - name: Harden Runner + uses: step-security/harden-runner@18bf8ad2ca49c14cbb28b91346d626ccfb00c518 # v2.1.0 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + with: + submodules: true + - name: Build + run: make -C third_party/tcplp/lib/test/ + - name: Run + run: third_party/tcplp/lib/test/test_all