-
-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (42 loc) · 1.36 KB
/
unit-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#** @file unit-test.yml
# @brief AG-Panel Project unit-test github action file.
# @copyright (C) 2023 Andriy Golovnya
# @author Andriy Golovnya (andriy.golovnya@gmail.com)
# Name of the action
name: Native Unit-Test Configuration
# Controls when the action will run. Triggers the workflow on each push request to workflow, source and test directories
on:
push:
paths:
- '.github/workflows/**'
- 'ag-panel/**'
- 'test/**'
- 'platformio.ini'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
main:
name: Main
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Git Checkout
uses: actions/checkout@master
# Installs python 3.x
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: '3.x'
# Updates pip and installs platformio
- name: Install Platform IO
run: |
python -m pip install --upgrade pip
pip install -U platformio
# Install native build tools
- name: Install Build Tools
run: |
sudo apt-get update
sudo apt-get install -y build-essential
# Runs unit-test command on native host
- name: Run Unit-Test
run: |
pio test -e native_test