Skip to content

Commit e36751c

Browse files
authored
Merge pull request arduino-libraries#54 from arduino-libraries/ci
Modernize continuous integration system
2 parents 862db08 + 62c1395 commit e36751c

8 files changed

+87
-19
lines changed

.codespellrc

+7
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 = wan
5+
check-filenames =
6+
check-hidden =
7+
skip = ./.git

.github/dependabot.yml

+10
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

+28
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

.github/workflows/compile-examples.yml

+12-5
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,24 @@ on:
44
pull_request:
55
paths:
66
- ".github/workflows/compile-examples.yml"
7+
- "library.properties"
78
- "examples/**"
89
- "src/**"
910
push:
1011
paths:
1112
- ".github/workflows/compile-examples.yml"
13+
- "library.properties"
1214
- "examples/**"
1315
- "src/**"
16+
schedule:
17+
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
18+
- cron: "0 8 * * TUE"
19+
workflow_dispatch:
20+
repository_dispatch:
1421

1522
jobs:
1623
build:
24+
name: ${{ matrix.board.fqbn }}
1725
runs-on: ubuntu-latest
1826

1927
env:
@@ -77,9 +85,7 @@ jobs:
7785
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
7886
7987
steps:
80-
- uses: actions/checkout@v1
81-
with:
82-
fetch-depth: 1
88+
- uses: actions/checkout@v2
8389

8490
# It's necessary to checkout the platform before installing it so that the ArduinoCore-API dependency can be added
8591
- name: Checkout ArduinoCore-mbed
@@ -110,7 +116,7 @@ jobs:
110116
run: pip3 install pyserial
111117

112118
- name: Compile examples
113-
uses: arduino/compile-sketches@main
119+
uses: arduino/compile-sketches@v1
114120
with:
115121
platforms: ${{ matrix.platforms }}
116122
fqbn: ${{ matrix.board.fqbn }}
@@ -121,7 +127,8 @@ jobs:
121127

122128
- name: Save memory usage change report as artifact
123129
if: github.event_name == 'pull_request'
124-
uses: actions/upload-artifact@v1
130+
uses: actions/upload-artifact@v2
125131
with:
132+
if-no-files-found: error
126133
name: ${{ env.SKETCHES_REPORTS_PATH }}
127134
path: ${{ env.SKETCHES_REPORTS_PATH }}
+9-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
name: Report PR Size Deltas
22

33
on:
4+
push:
5+
paths:
6+
- ".github/workflows/report-size-deltas.yml"
47
schedule:
58
- cron: '*/5 * * * *'
9+
workflow_dispatch:
10+
repository_dispatch:
611

712
jobs:
813
report:
914
runs-on: ubuntu-latest
1015

1116
steps:
1217
- name: Comment size deltas reports to PRs
13-
uses: arduino/actions/libraries/report-size-deltas@master
18+
uses: arduino/report-size-deltas@v1
19+
with:
20+
# The name of the workflow artifact created by the sketch compilation workflow
21+
sketches-reports-source: sketches-reports

.github/workflows/spell-check.yml

+18-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
name: Spell Check
2-
on: [push, pull_request]
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+
313
jobs:
4-
build:
5-
runs-on: ubuntu-latest
14+
spellcheck:
15+
runs-on: ubuntu-latest
616

7-
steps:
8-
- uses: actions/checkout@v1
9-
with:
10-
fetch-depth: 1
11-
- uses: arduino/actions/libraries/spell-check@master
12-
with:
13-
ignore-words-list: extras/codespell-ignore-words-list.txt
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
1420

21+
- name: Spell check
22+
uses: codespell-project/actions-codespell@master

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
Arduino Library for network connections management
22
==================================================
3-
![](https://github.com/arduino-libraries/Arduino_ConnectionHandler/workflows/Compile%20Examples/badge.svg)
4-
![](https://github.com/arduino-libraries/Arduino_ConnectionHandler/workflows/Spell%20Check/badge.svg)
53

4+
[![Check Arduino status](https://github.com/arduino-libraries/Arduino_ConnectionHandler/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_ConnectionHandler/actions/workflows/check-arduino.yml)
5+
[![Compile Examples status](https://github.com/arduino-libraries/Arduino_ConnectionHandler/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_ConnectionHandler/actions/workflows/compile-examples.yml)
6+
[![Spell Check status](https://github.com/arduino-libraries/Arduino_ConnectionHandler/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_ConnectionHandler/actions/workflows/spell-check.yml)
67

78
Library for handling and managing network connections by providing keep-alive functionality and automatic reconnection in case of connection-loss. It supports the following boards:
89
* **WiFi**: [`MKR 1000`](https://store.arduino.cc/arduino-mkr1000-wifi), [`MKR WiFi 1010`](https://store.arduino.cc/arduino-mkr-wifi-1010), [`Nano 33 IoT`](https://store.arduino.cc/arduino-nano-33-iot), `ESP8266`

extras/codespell-ignore-words-list.txt

-1
This file was deleted.

0 commit comments

Comments
 (0)