Workflow: Dispatch and Test runner workflow test #1
Testing the dispatcher and engine_test workflow for any bugs, the changes on these files always need to be uploaded to github to test if it is working correctly
This commit is contained in:
65
.github/workflows/dispatcher.yml
vendored
Normal file
65
.github/workflows/dispatcher.yml
vendored
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
name: Dispatcher
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '**' # minden branchre lefut
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
detect-and-dispatch:
|
||||||
|
runs-on: self-hosted # (sajat rpi-on fusson)
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Detect project from branch name
|
||||||
|
id: detect
|
||||||
|
run: |
|
||||||
|
BRANCH_NAME=${GITHUB_REF##*/}
|
||||||
|
echo "Branch name: $BRANCH_NAME"
|
||||||
|
|
||||||
|
if [[ "$BRANCH_NAME" == Engine/* ]]; then
|
||||||
|
echo "project=Engine" >> $GITHUB_OUTPUT
|
||||||
|
elif [[ "$BRANCH_NAME" == Server/* ]]; then
|
||||||
|
echo "project=Server" >> $GITHUB_OUTPUT
|
||||||
|
elif [[ "$BRANCH_NAME" == UI/* ]]; then
|
||||||
|
echo "project=UI" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "project=unknown" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Trigger Engine tests
|
||||||
|
if: steps.detect.outputs.project == 'Engine'
|
||||||
|
uses: peter-evans/workflow-dispatch@v2
|
||||||
|
with:
|
||||||
|
workflow: "engine_test.yml"
|
||||||
|
ref: ${{ github.ref }}
|
||||||
|
|
||||||
|
- name: Trigger Server tests
|
||||||
|
if: steps.detect.outputs.project == 'Server'
|
||||||
|
uses: peter-evans/workflow-dispatch@v2
|
||||||
|
with:
|
||||||
|
workflow: "server_test.yml"
|
||||||
|
ref: ${{ github.ref }}
|
||||||
|
|
||||||
|
- name: Trigger UI tests
|
||||||
|
if: steps.detect.outputs.project == 'UI'
|
||||||
|
uses: peter-evans/workflow-dispatch@v2
|
||||||
|
with:
|
||||||
|
workflow: "ui_test.yml"
|
||||||
|
ref: ${{ github.ref }}
|
||||||
|
|
||||||
|
- name: Trigger all tests (main/master)
|
||||||
|
if: github.ref_name == 'main' || github.ref_name == 'master'
|
||||||
|
uses: peter-evans/workflow-dispatch@v2
|
||||||
|
with:
|
||||||
|
workflow: "engine_test.yml"
|
||||||
|
ref: ${{ github.ref }}
|
||||||
|
- uses: peter-evans/workflow-dispatch@v2
|
||||||
|
if: github.ref_name == 'main' || github.ref_name == 'master'
|
||||||
|
with:
|
||||||
|
workflow: "server_test.yml"
|
||||||
|
ref: ${{ github.ref }}
|
||||||
|
- uses: peter-evans/workflow-dispatch@v2
|
||||||
|
if: github.ref_name == 'main' || github.ref_name == 'master'
|
||||||
|
with:
|
||||||
|
workflow: "ui_test.yml"
|
||||||
|
ref: ${{ github.ref }}
|
||||||
22
.github/workflows/engine_test.yml
vendored
Normal file
22
.github/workflows/engine_test.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
name: Engine Tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
engine-tests:
|
||||||
|
runs-on: self-hosted
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Rust
|
||||||
|
uses: actions/setup-rust@v1
|
||||||
|
with:
|
||||||
|
rust-version: stable
|
||||||
|
|
||||||
|
- name: Run Engine tests
|
||||||
|
run: |
|
||||||
|
cd engine
|
||||||
|
ls
|
||||||
|
cargo test --verbose
|
||||||
Reference in New Issue
Block a user