Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Transmit Git Hash over CAN #227

Transmit Git Hash over CAN

Transmit Git Hash over CAN #227

name: Build and Test Projects
on: [pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Test PlatformIO Libaries and Projects
shell: bash
run: |
git ls-files -z '**/platformio.ini' | while IFS= read -r -d '' ini; do
dir=$(dirname "$ini")
if [ -d "$dir/test" ]; then
echo "============================================================"
echo "==== Testing $dir"
echo "============================================================"
pio test --project-dir "$dir" -vvv || exit 1
else
echo "No tests found in $dir"
fi
done
- name: Build PlatformIO Projects
shell: bash
run: |
git ls-files -z 'projects/**/platformio.ini' | while IFS= read -r -d '' ini; do
dir=$(dirname "$ini")
echo "============================================================"
echo "==== Building $dir"
echo "============================================================"
pio run --project-dir "$dir" -vvv || exit 1
done