@@ -3,50 +3,55 @@ name: Test
33on :
44 push :
55 branches :
6- - " **"
6+ - " *"
7+ - " */*"
78 pull_request :
8- types : [opened]
9+ types : [ready_for_review, synchronize, opened]
910
1011jobs :
11- arduino-default :
12+ arduino :
1213 runs-on : ubuntu-latest
1314
1415 steps :
1516 - uses : actions/checkout@v1
1617 - name : Make scripts executable
1718 run : sudo chmod -R +x ./.github/workflows/test/*.sh
18- - name : Install
19+ - name : Install Dependencies
1920 run : ./.github/workflows/test/install_arduino.sh
20- - name : Build
21+ - name : Build Arduino Sketch
2122 run : ./.github/workflows/test/script_arduino.sh
2223
23- linux-default :
24+ platformio :
2425 runs-on : ubuntu-latest
2526
2627 steps :
2728 - uses : actions/checkout@v1
28- - name : Make scripts executable
29- run : sudo chmod -R +x ./.github/workflows/test/*.sh
30- - name : Install
31- run : ./.github/workflows/test/install_platform_io.sh
29+ - name : Install Dependencies
30+ run : |
31+ sudo pip install -U platformio
32+ platformio update
3233 - name : Build
33- run : ./.github/workflows/test/script_platform_io.sh
34+ run : |
35+ platformio run
36+ platformio run -d ./test
37+
3438 linux-gcc7 :
3539 runs-on : ubuntu-latest
3640
3741 steps :
3842 - uses : actions/checkout@v1
39- - name : Install dependencies
43+ - name : Install Dependencies
4044 run : |
41- sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
42- sudo apt-get update
43- sudo apt-get -y install g++-7 lcov cmake openssl
44- - name : Make scripts executable
45- run : sudo chmod -R +x ./.github/workflows/test/*.sh
46- - name : Environment variables
47- run : CC=gcc-7 && CXX=g++-7
45+ sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
46+ sudo apt-get update
47+ sudo apt-get -y install g++-7 lcov cmake openssl
4848 - name : Build
49- run : ./.github/workflows/test/script_desktop.sh
49+ run : |
50+ mkdir build && cd build
51+ cmake -DCMAKE_BUILD_TYPE=Coverage -DUNIT_TEST=ON ..
52+ cmake --build .
53+ - name : Run Tests
54+ run : ./build/test/ark_cpp_client_tests
5055 - name : Codecov upload
5156 run : bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}
5257
@@ -55,16 +60,19 @@ jobs:
5560
5661 steps :
5762 - uses : actions/checkout@v1
58- - name : Install dependencies
63+ - name : Install Dependencies
5964 run : |
60- sudo apt-get update
61- sudo apt-get -y install clang-5.0 clang-format-5.0 clang-tidy-5.0 lcov cmake openssl
65+ sudo apt-get update
66+ sudo apt-get -y install clang-5.0 clang-format-5.0 clang-tidy-5.0 lcov cmake openssl
6267 - name : Make scripts executable
6368 run : sudo chmod -R +x ./.github/workflows/test/*.sh
64- - name : Environment variables
65- run : CC=clang-5.0 && CXX=clang++-5.0
6669 - name : Build
67- run : ./.github/workflows/test/script_desktop.sh
70+ run : |
71+ mkdir build && cd build
72+ cmake -DUNIT_TEST=ON ..
73+ cmake --build .
74+ - name : Run Tests
75+ run : ./build/test/ark_cpp_client_tests
6876 - name : Clang Tidy
6977 run : ./.github/workflows/test/clang_tidy.sh
7078 - name : Clang Format
7684 steps :
7785 - uses : actions/checkout@v1
7886 - run : COMPILER=clang++
79- - name : Install dependencies
80- run : brew install cmake lcov
81- - name : Make scripts executable
82- run : sudo chmod -R +x ./.github/workflows/test/*.sh
87+ - name : Install Dependencies
88+ run : brew install cmake
8389 - name : Build
84- run : ./.github/workflows/test/script_desktop.sh
90+ run : |
91+ mkdir build && cd build
92+ cmake -DUNIT_TEST=ON ..
93+ cmake --build .
94+ - name : Run Tests
95+ run : ./build/test/ark_cpp_client_tests
0 commit comments