46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
|
# This is a basic workflow to help you get started with Actions
|
||
|
|
||
|
name: Unit Tests
|
||
|
|
||
|
# Controls when the workflow will run
|
||
|
on:
|
||
|
# Triggers the workflow on push or pull request events but only for the master branch
|
||
|
push:
|
||
|
branches: [ master ]
|
||
|
|
||
|
# Allows you to run this workflow manually from the Actions tab
|
||
|
workflow_dispatch:
|
||
|
|
||
|
jobs:
|
||
|
build:
|
||
|
|
||
|
runs-on: ubuntu-latest
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- name: Cache pip
|
||
|
uses: actions/cache@v2
|
||
|
with:
|
||
|
path: ~/.cache/pip
|
||
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||
|
restore-keys: |
|
||
|
${{ runner.os }}-pip-
|
||
|
- name: Cache PlatformIO
|
||
|
uses: actions/cache@v2
|
||
|
with:
|
||
|
path: ~/.platformio
|
||
|
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||
|
|
||
|
- name: Set up Python
|
||
|
uses: actions/setup-python@v2
|
||
|
|
||
|
- name: Install PlatformIO
|
||
|
run: |
|
||
|
python -m pip install --upgrade pip
|
||
|
pip install --upgrade platformio
|
||
|
|
||
|
- name: Run Unit Tests
|
||
|
env:
|
||
|
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}
|
||
|
run: platformio remote test --force-remote --environment megaatmega2560
|