Skip to content

Commit

Permalink
Use rodbot to provide authenticated testing
Browse files Browse the repository at this point in the history
  • Loading branch information
lulf committed May 2, 2024
1 parent 2c6a695 commit 209649a
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 12 deletions.
11 changes: 11 additions & 0 deletions .github/rodbot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
on:
issue_comment:
- if:
- command: "test"
- user_is: ["MEMBER", "OWNER"]
- is_pr
steps:
- run: |
gh workflow run tests.yaml -R embassy-rs/trouble -F prNr=${{ github.event.issue.number }}
- run: |
gh pr comment ${{ github.event.issue.number }} -b "Aye, aye, captain! … Triggered Test worklow!"
12 changes: 0 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,3 @@ jobs:
- name: Build examples
run: for i in nrf-sdc; do pushd examples/$i; cargo fmt --check && cargo clippy && cargo build --release; popd; done;
#integration-tests:
# runs-on: self-hosted
# steps:
# - uses: actions/checkout@v4
# - name: Build
# env:
# TEST_ADAPTER_ONE: /dev/ttyACM0
# TEST_ADAPTER_TWO: /dev/ttyACM1
# RUST_LOG: info
# run: |
# cd host
# cargo test --test '*' -- --nocapture
24 changes: 24 additions & 0 deletions .github/workflows/rodbot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: rodbot

on:
issue_comment:
types: [ "created" ]

jobs:
rodbot:
runs-on: ubuntu-22.04

env:
GH_TOKEN: ${{ secrets.BOT_PAT }}

steps:
- run: |
echo $GITHUB_EVENT_PATH
cat $GITHUB_EVENT_PATH
- name: Checkout
uses: actions/checkout@v3

- uses: ctron/[email protected]
with:
config: .github/rodbot.yaml
18 changes: 18 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Tests

on:
workflow_dispatch: {}

jobs:
integration-tests:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Build
env:
TEST_ADAPTER_ONE: /dev/ttyACM0
TEST_ADAPTER_TWO: /dev/ttyACM1
RUST_LOG: info
run: |
cd host
cargo test --test '*' -- --nocapture

0 comments on commit 209649a

Please sign in to comment.