Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: Tests on local runners with shared USB resources #63

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,53 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc

compile-examples:
needs: quick-tests
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Compile examples for ARM v7
uses: houseabsolute/[email protected]
with:
target: armv7-unknown-linux-gnueabihf
args: "--examples --release"
- name: Upload compiled examples
uses: actions/[email protected]
with:
name: examples-armv7
path: target/armv7-unknown-linux-gnueabihf/release/examples/*

local-tests:
needs: compile-examples
runs-on: raspbian-armv7-kernel-5.10.33
if: ${{ github.repository_owner == 'bluerobotics' }}
steps:
- name: Run USB management script
run: /etc/github_runner/ci_management.sh
- name: Checkout repository
uses: actions/[email protected]
- name: Download compiled examples
uses: actions/[email protected]
with:
name: examples-armv7
path: ./examples
- name: Make examples executable
run: |
chmod +x ./examples/*
- name: Run Tests
env:
STOP_ON_FAILURE: "false" # Set to "true" to stop on first failure
run: |
/etc/github_runner/run-tests.sh \
"Basic Ping1D Test w Ping1:ping_1d:--serial-port /dev/ttyUSB_Ping1:30" \
"Basic Ping1D Test w Ping2:ping_1d:--serial-port /dev/ttyUSB_Ping2:30"
# Test Name:Example Name:Additional Args:Timeout
- name: Post CI management script
if: always()
run: |
source /etc/github_runner/ci_management.sh
clear_busy_state

deploy:
needs: build
runs-on: ubuntu-latest
Expand Down
Loading