Speperated test and publish pipeline

This commit is contained in:
Felix Weiß
2023-06-16 11:18:08 +02:00
parent ad61361008
commit 3dea18d285
2 changed files with 46 additions and 30 deletions

49
.github/workflows/test-pipeline.yml vendored Normal file
View File

@@ -0,0 +1,49 @@
name: Test pipeline
on:
workflow_dispatch:
push:
branches:
- main
- master
paths-ignore:
- '**.md'
permissions: write-all
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]
steps:
- name: 'Ping FPX-H-C30T'
run: ping 192.168.115.210 -w 5
- name: 'Ping FPX-H-C14R'
run: ping 192.168.115.212 -w 5
- 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
runs-on: [self-hosted, linux, x64, womed-local-linux]
steps:
- uses: actions/checkout@v3
- name: 'Setup dotnet'
uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
- name: 'Run tests'
run: |
cd '${{ github.workspace }}/MewtocolTests'
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
#Upload to codecov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}