Created
June 4, 2022 22:06
-
-
Save vixtory09678/e5d5d7098988ba792c7df4195846b3d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PlatformIO CI | |
on: [push] | |
jobs: | |
dependencies: | |
name: setup dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cache pip | |
id: cache-pip | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Set up Python | |
if: steps.cache-pip.outputs.cache-hit != 'true' | |
uses: actions/setup-python@v2 | |
- name: Install pip | |
if: steps.cache-pip.outputs.cache-hit != 'true' | |
run: python -m pip install --upgrade pip | |
build: | |
needs: dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cache pip | |
id: cache-pip | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- run: | | |
pip install -U platformio | |
platformio update | |
- name: build project | |
run: platformio run | |
lint: | |
needs: dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cache pip | |
id: cache-pip | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- run: | | |
pip install -U platformio | |
platformio update | |
- name: check format | |
run: platformio check --fail-on-defect high |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment