From 6c50324696670a2bfe3389d23df59edc4df2a178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Wei=C3=9F?= <72068105+Sandoun@users.noreply.github.com> Date: Tue, 13 Jun 2023 12:58:37 +0200 Subject: [PATCH] Code ql test --- .../{test-on-hardware.yml => build-pipeline.yml} | 11 +++++++++-- .github/workflows/codeql.yml | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) rename .github/workflows/{test-on-hardware.yml => build-pipeline.yml} (91%) diff --git a/.github/workflows/test-on-hardware.yml b/.github/workflows/build-pipeline.yml similarity index 91% rename from .github/workflows/test-on-hardware.yml rename to .github/workflows/build-pipeline.yml index 5a08d34..115c97a 100644 --- a/.github/workflows/test-on-hardware.yml +++ b/.github/workflows/build-pipeline.yml @@ -1,4 +1,4 @@ -name: Test mewtocol on real hardware +name: Build pipeline on: workflow_dispatch: @@ -9,6 +9,7 @@ on: jobs: + #Check the online status of the test PLCs first check-plcs-online: name: 'Test PLC online status' runs-on: [self-hosted, linux, x64, womed-local-linux] @@ -20,6 +21,7 @@ jobs: - name: 'Ping FPX-C30T' run: ping 192.168.115.213 -w 5 + #Run unit tests on the test PLCs run-unit-tests: name: 'Run unit tests' needs: check-plcs-online @@ -38,9 +40,14 @@ jobs: cd '${{ github.workspace }}/MewtocolTests' dotnet test --logger:"console;verbosity=detailed" + #Run code ql check + code-ql-check: + uses: ./.github/workflows/codeql.yml + + #Publish to nuget if version tag change detected publish-and-push-nuget: name: 'Build and publish to NuGet' - needs: run-unit-tests + needs: [run-unit-tests, ] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a37b14c..def23bb 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -12,6 +12,7 @@ name: "CodeQL" on: + workflow_call: push: branches: [ "master" ] pull_request: