Skip to content

Commit 20d98c2

Browse files
authored
Merge pull request #18 from arduino-libraries/ci
Use GitHub Actions for continuous integration
2 parents c286a28 + 947294d commit 20d98c2

File tree

12 files changed

+185
-13
lines changed

12 files changed

+185
-13
lines changed

.codespellrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# See: https://github.com/codespell-project/codespell#using-a-config-file
2+
[codespell]
3+
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
4+
ignore-words-list = ,
5+
check-filenames =
6+
check-hidden =
7+
skip = ./.git

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# See: https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#about-the-dependabotyml-file
2+
version: 2
3+
4+
updates:
5+
# Configure check for outdated GitHub Actions actions in workflows.
6+
# See: https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot
7+
- package-ecosystem: github-actions
8+
directory: / # Check the repository's workflows under /.github/workflows/
9+
schedule:
10+
interval: daily

.github/workflows/check-arduino.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Check Arduino
2+
3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
pull_request:
7+
schedule:
8+
# Run every Tuesday at 8 AM UTC to catch breakage caused by new rules added to Arduino Lint.
9+
- cron: "0 8 * * TUE"
10+
workflow_dispatch:
11+
repository_dispatch:
12+
13+
jobs:
14+
lint:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
21+
- name: Arduino Lint
22+
uses: arduino/arduino-lint-action@v1
23+
with:
24+
compliance: specification
25+
library-manager: update
26+
# Always use this setting for official repositories. Remove for 3rd party projects.
27+
official: true
28+
project-type: library
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Compile Examples
2+
3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
paths:
7+
- ".github/workflows/compile-examples.yml"
8+
- "examples/**"
9+
- "src/**"
10+
pull_request:
11+
paths:
12+
- ".github/workflows/compile-examples.yml"
13+
- "examples/**"
14+
- "src/**"
15+
schedule:
16+
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
17+
- cron: "0 8 * * TUE"
18+
workflow_dispatch:
19+
repository_dispatch:
20+
21+
jobs:
22+
build:
23+
name: ${{ matrix.board.fqbn }}
24+
runs-on: ubuntu-latest
25+
26+
env:
27+
SKETCHES_REPORTS_PATH: sketches-reports
28+
29+
strategy:
30+
fail-fast: false
31+
32+
matrix:
33+
board:
34+
- fqbn: arduino:avr:uno
35+
platforms: |
36+
- name: arduino:avr
37+
- fqbn: arduino:avr:mega
38+
platforms: |
39+
- name: arduino:avr
40+
- fqbn: arduino:avr:leonardo
41+
platforms: |
42+
- name: arduino:avr
43+
- fqbn: arduino:megaavr:uno2018
44+
platforms: |
45+
- name: arduino:megaavr
46+
- fqbn: arduino:samd:arduino_zero_edbg
47+
platforms: |
48+
- name: arduino:samd
49+
50+
steps:
51+
- name: Checkout repository
52+
uses: actions/checkout@v2
53+
54+
- name: Compile examples
55+
uses: arduino/compile-sketches@v1
56+
with:
57+
github-token: ${{ secrets.GITHUB_TOKEN }}
58+
fqbn: ${{ matrix.board.fqbn }}
59+
platforms: ${{ matrix.board.platforms }}
60+
libraries: |
61+
# Install the library from the local path.
62+
- source-path: ./
63+
- name: DHT sensor library
64+
- name: Grove-3-Axis-Digital-Accelerometer-2g-to-16g-LIS3DHTR
65+
- name: Grove - Barometer Sensor BMP280
66+
- name: U8g2
67+
sketch-paths: |
68+
- examples
69+
enable-deltas-report: true
70+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
71+
72+
- name: Save sketches report as workflow artifact
73+
uses: actions/upload-artifact@v2
74+
with:
75+
if-no-files-found: error
76+
path: ${{ env.SKETCHES_REPORTS_PATH }}
77+
name: ${{ env.SKETCHES_REPORTS_PATH }}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Report Size Deltas
2+
3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
paths:
7+
- ".github/workflows/report-size-deltas.yml"
8+
schedule:
9+
# Run at the minimum interval allowed by GitHub Actions.
10+
# Note: GitHub Actions periodically has outages which result in workflow failures.
11+
# In this event, the workflows will start passing again once the service recovers.
12+
- cron: "*/5 * * * *"
13+
workflow_dispatch:
14+
repository_dispatch:
15+
16+
jobs:
17+
report:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Comment size deltas reports to PRs
21+
uses: arduino/report-size-deltas@v1
22+
with:
23+
# The name of the workflow artifact created by the sketch compilation workflow
24+
sketches-reports-source: sketches-reports

.github/workflows/spell-check.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Spell Check
2+
3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
pull_request:
7+
schedule:
8+
# Run every Tuesday at 8 AM UTC to catch new misspelling detections resulting from dictionary updates.
9+
- cron: "0 8 * * TUE"
10+
workflow_dispatch:
11+
repository_dispatch:
12+
13+
jobs:
14+
spellcheck:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
21+
- name: Spell check
22+
uses: codespell-project/actions-codespell@master

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
# Arduino Sensorkit Library
1+
# Arduino SensorKit Library
2+
3+
[![Check Arduino status](https://github.com/arduino-libraries/Arduino_SensorKit/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_SensorKit/actions/workflows/check-arduino.yml)
4+
[![Compile Examples status](https://github.com/arduino-libraries/Arduino_SensorKit/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_SensorKit/actions/workflows/compile-examples.yml)
5+
[![Spell Check status](https://github.com/arduino-libraries/Arduino_SensorKit/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_SensorKit/actions/workflows/spell-check.yml)
26

37
This documentation contains information about the classes and the usage of Arduino_SensorKit library which is primarily used in the [Arduino Sensor Kit](https://store.arduino.cc/sensor-kit-base). This library is a wrapper for other libraries such as
48

5-
* [u8g2](https://github.com/olikraus/U8g2_Arduino) Library for monochrome displayes
9+
* [u8g2](https://github.com/olikraus/U8g2_Arduino) Library for monochrome displays
610
* [Seeed_Arduino_LIS3DHTR](https://github.com/Seeed-Studio/Seeed_Arduino_LIS3DHTR) for the 3 Axis Accelerometer
711
* [Grove_BMP280](https://github.com/Seeed-Studio/Grove_BMP280) Library for the Barometer
812
* [DHT-sensor-library](https://github.com/adafruit/DHT-sensor-library) for the Temperature and Humidity Sensor
913

10-
The Arduino_SensorKit Library can be downloaded from the Arduino IDEs library manager or from the github repository
14+
The Arduino_SensorKit Library can be downloaded from the Arduino IDE's library manager or from the GitHub repository.

docs/readme.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# **Sensor Kit Reference**
22

33
This documentation contains information about the classes and the usage of **Arduino_SensorKit** library which is primarily used in the [Arduino Sensor Kit](https://sensorkit.arduino.cc/). This library is a wrapper for other libraries such as
4-
* [u8g2 Library for monochrome displayes](https://github.com/olikraus/u8g2)
4+
* [u8g2 Library for monochrome displays](https://github.com/olikraus/u8g2)
55
* [Seeed_Arduino_LIS3DHTR for the 3 Axis Accelerometer](https://github.com/Seeed-Studio/Seeed_Arduino_LIS3DHTR)
66
* [Grove_BMP280 Library for the Barometer](https://github.com/Seeed-Studio/Grove_BMP280)
77
* [DHT-sensor-library for the Temperature and Humidity Sensor](https://github.com/adafruit/DHT-sensor-library)
88

9-
The Arduino_SensorKit Library can be downloaded from the Arduino IDE’s library manager or from the [github repository](https://github.com/arduino-libraries/Arduino_SensorKit)
9+
The Arduino_SensorKit Library can be downloaded from the Arduino IDE's Library Manager or from the [GitHub repository](https://github.com/arduino-libraries/Arduino_SensorKit)
1010

1111
# Classes
1212

@@ -22,7 +22,7 @@ The Arduino_SensorKit Library can be downloaded from the Arduino IDE’s library
2222
## OLED
2323
Using the Grove - OLED Display 0.96 inch
2424

25-
### Initialising the driver
25+
### Initializing the driver
2626

2727
Init the display driver
2828

@@ -59,7 +59,7 @@ void loop() {
5959
## Accelerometer
6060
Using the Grove - 3-Axis Digital Accelerometer (±1.5g)
6161

62-
### Initialising the sensor
62+
### Initializing the sensor
6363

6464
Initialize the sensor
6565

@@ -137,7 +137,7 @@ Return if the sensor its good to give the data
137137
Using the Grove Barometer Sensor (BMP280)
138138
The Pressure sensor can get temperature, pressure and altitude
139139

140-
### Initialising the sensor
140+
### Initializing the sensor
141141
Initialize the sensor
142142
```cpp
143143
void setup(){
@@ -212,7 +212,7 @@ By default, once you include the library it has been set to digital pin `3`, it
212212
#define DHTPIN yourPin
213213
```
214214
215-
### Initialising the sensor
215+
### Initializing the sensor
216216
```cpp
217217
void setup(){
218218
Environment.begin();

examples/Combined_Demo/Combined_Demo.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Combined Demo by Marc MERLIN <marc_soft@merlins.org>
22
// Reviewed by Pablo Marquínez <p.marquinez@arduino.cc>
3-
// This demo use all the devices from the Arduino SensorKit
3+
// This demo uses all the devices from the Arduino Sensor Kit
44
// Showing the values on the Display
55

66
#include "Arduino_SensorKit.h"

examples/Pressure_Sensor/Pressure_Sensor.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ void loop() {
99
// Get and print temperatures
1010
Serial.print("Temp: ");
1111
Serial.print(Pressure.readTemperature());
12-
Serial.println("C"); // The unit for Celsius because original arduino don't support speical symbols
12+
Serial.println("C"); // The unit for Celsius because original Arduino don't support special symbols
1313

1414
// Get and print atmospheric pressure data
1515
Serial.print("Pressure: ");

keywords.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#######################################
2-
# Syntax Coloring Map of SensorKit
2+
# Syntax Coloring Map of Arduino_SensorKit
33
#######################################
44

55
#######################################

src/Arduino_SensorKit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "Arduino_SensorKit_BMP280.h" // Pressure
1515
#include "Arduino_SensorKit_LIS3DHTR.h" // Accel
1616
#include "DHT.h" // Temp & Humidity
17-
#include "U8x8lib.h" // Oled Display
17+
#include "U8x8lib.h" // OLED Display
1818

1919
//Defines
2020
#ifndef DHTTYPE

0 commit comments

Comments
 (0)