Skip to content

Commit 1751e10

Browse files
authored
Merge pull request #102 from arduino-libraries/ci
Use GitHub Actions for continuous integration
2 parents 9a5afdf + b9db038 commit 1751e10

25 files changed

+185
-30
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 = ,
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
+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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:samd:mkr1000
35+
platforms: |
36+
- name: arduino:samd
37+
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@v2
41+
42+
- name: Compile examples
43+
uses: arduino/compile-sketches@v1
44+
with:
45+
github-token: ${{ secrets.GITHUB_TOKEN }}
46+
fqbn: ${{ matrix.board.fqbn }}
47+
platforms: ${{ matrix.board.platforms }}
48+
libraries: |
49+
# Install the library from the local path.
50+
- source-path: ./
51+
- name: WiFi101
52+
sketch-paths: |
53+
- examples
54+
enable-deltas-report: true
55+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
56+
57+
- name: Save sketches report as workflow artifact
58+
uses: actions/upload-artifact@v2
59+
with:
60+
if-no-files-found: error
61+
path: ${{ env.SKETCHES_REPORTS_PATH }}
62+
name: ${{ env.SKETCHES_REPORTS_PATH }}
+24
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

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

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
## ArduinoHttpClient 0.3.1 - 2017.09.25
1010

1111
* Changed examples to support Arduino Create secret tabs
12-
* Increase WebSocket secrect-key length to 24 characters
12+
* Increase WebSocket secret-key length to 24 characters
1313

1414
## ArduinoHttpClient 0.3.0 - 2017.04.20
1515

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# ArduinoHttpClient
22

3+
[![Check Arduino status](https://github.com/arduino-libraries/ArduinoHttpClient/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/arduino-libraries/ArduinoHttpClient/actions/workflows/check-arduino.yml)
4+
[![Compile Examples status](https://github.com/arduino-libraries/ArduinoHttpClient/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/arduino-libraries/ArduinoHttpClient/actions/workflows/compile-examples.yml)
5+
[![Spell Check status](https://github.com/arduino-libraries/ArduinoHttpClient/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino-libraries/ArduinoHttpClient/actions/workflows/spell-check.yml)
6+
37
ArduinoHttpClient is a library to make it easier to interact with web servers from Arduino.
48

59
Derived from [Adrian McEwen's HttpClient library](https://github.com/amcewen/HttpClient)

examples/BasicAuthGet/BasicAuthGet.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <WiFi101.h>
1616
#include "arduino_secrets.h"
1717
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
18-
/////// Wifi Settings ///////
18+
/////// WiFi Settings ///////
1919
char ssid[] = SECRET_SSID;
2020
char pass[] = SECRET_PASS;
2121

examples/CustomHeader/CustomHeader.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#include "arduino_secrets.h"
1717
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
18-
/////// Wifi Settings ///////
18+
/////// WiFi Settings ///////
1919
char ssid[] = SECRET_SSID;
2020
char pass[] = SECRET_PASS;
2121

examples/DweetGet/DweetGet.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
#include "arduino_secrets.h"
2222
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
23-
/////// Wifi Settings ///////
23+
/////// WiFi Settings ///////
2424
char ssid[] = SECRET_SSID;
2525
char pass[] = SECRET_PASS;
2626

examples/DweetPost/DweetPost.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include "arduino_secrets.h"
1818
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
19-
/////// Wifi Settings ///////
19+
/////// WiFi Settings ///////
2020
char ssid[] = SECRET_SSID;
2121
char pass[] = SECRET_PASS;
2222

examples/HueBlink/HueBlink.ino

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
The body of the PUT request looks like this:
1111
{"on": true} or {"on":false}
1212
13-
This example shows how to concatenate Strings to assemble the
13+
This example shows how to concatenate Strings to assemble the
1414
PUT request and the body of the request.
1515
1616
modified 15 Feb 2016
@@ -23,16 +23,16 @@
2323
#include "arduino_secrets.h"
2424

2525
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
26-
/////// Wifi Settings ///////
26+
/////// WiFi Settings ///////
2727
char ssid[] = SECRET_SSID;
2828
char pass[] = SECRET_PASS;
2929

30-
int status = WL_IDLE_STATUS; // the Wifi radio's status
30+
int status = WL_IDLE_STATUS; // the WiFi radio's status
3131

3232
char hueHubIP[] = "192.168.0.3"; // IP address of the HUE bridge
3333
String hueUserName = "huebridgeusername"; // hue bridge username
3434

35-
// make a wifi instance and a HttpClient instance:
35+
// make a WiFiClient instance and a HttpClient instance:
3636
WiFiClient wifi;
3737
HttpClient httpClient = HttpClient(wifi, hueHubIP);
3838

@@ -42,7 +42,7 @@ void setup() {
4242
Serial.begin(9600);
4343
while (!Serial); // wait for serial port to connect.
4444

45-
// attempt to connect to Wifi network:
45+
// attempt to connect to WiFi network:
4646
while ( status != WL_CONNECTED) {
4747
Serial.print("Attempting to connect to WPA SSID: ");
4848
Serial.println(ssid);
@@ -95,4 +95,4 @@ void sendRequest(int light, String cmd, String value) {
9595
Serial.print("Server response: ");
9696
Serial.println(response);
9797
Serial.println();
98-
}
98+
}

examples/PostWithHeaders/PostWithHeaders.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
POST with headers client for ArduinoHttpClient library
33
Connects to server once every five seconds, sends a POST request
4-
with custome headers and a request body
4+
with custom headers and a request body
55
66
created 14 Feb 2016
77
by Tom Igoe
@@ -18,7 +18,7 @@
1818
#include "arduino_secrets.h"
1919

2020
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
21-
/////// Wifi Settings ///////
21+
/////// WiFi Settings ///////
2222
char ssid[] = SECRET_SSID;
2323
char pass[] = SECRET_PASS;
2424

examples/SimpleDelete/SimpleDelete.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "arduino_secrets.h"
1616

1717
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
18-
/////// Wifi Settings ///////
18+
/////// WiFi Settings ///////
1919
char ssid[] = SECRET_SSID;
2020
char pass[] = SECRET_PASS;
2121

examples/SimpleGet/SimpleGet.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "arduino_secrets.h"
1515

1616
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
17-
/////// Wifi Settings ///////
17+
/////// WiFi Settings ///////
1818
char ssid[] = SECRET_SSID;
1919
char pass[] = SECRET_PASS;
2020

examples/SimpleHttpExample/SimpleHttpExample.ino

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Released under Apache License, version 2.0
33
//
44
// Simple example to show how to use the HttpClient library
5-
// Get's the web page given at http://<kHostname><kPath> and
5+
// Gets the web page given at http://<kHostname><kPath> and
66
// outputs the content to the serial port
77

88
#include <SPI.h>
@@ -14,7 +14,7 @@
1414
#include "arduino_secrets.h"
1515

1616
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
17-
/////// Wifi Settings ///////
17+
/////// WiFi Settings ///////
1818
char ssid[] = SECRET_SSID;
1919
char pass[] = SECRET_PASS;
2020

@@ -42,7 +42,7 @@ void setup()
4242
; // wait for serial port to connect. Needed for native USB port only
4343
}
4444

45-
// attempt to connect to Wifi network:
45+
// attempt to connect to WiFi network:
4646
Serial.print("Attempting to connect to WPA SSID: ");
4747
Serial.println(ssid);
4848
while (WiFi.begin(ssid, pass) != WL_CONNECTED) {
@@ -129,5 +129,3 @@ void loop()
129129
// And just stop, now that we've tried a download
130130
while(1);
131131
}
132-
133-

examples/SimplePost/SimplePost.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "arduino_secrets.h"
1515

1616
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
17-
/////// Wifi Settings ///////
17+
/////// WiFi Settings ///////
1818
char ssid[] = SECRET_SSID;
1919
char pass[] = SECRET_PASS;
2020

examples/SimplePut/SimplePut.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "arduino_secrets.h"
1515

1616
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
17-
/////// Wifi Settings ///////
17+
/////// WiFi Settings ///////
1818
char ssid[] = SECRET_SSID;
1919
char pass[] = SECRET_PASS;
2020

examples/SimpleWebSocket/SimpleWebSocket.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "arduino_secrets.h"
1616

1717
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
18-
/////// Wifi Settings ///////
18+
/////// WiFi Settings ///////
1919
char ssid[] = SECRET_SSID;
2020
char pass[] = SECRET_PASS;
2121

keywords.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#######################################
2-
# Syntax Coloring Map For HttpClient
2+
# Syntax Coloring Map For ArduinoHttpClient
33
#######################################
44

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

library.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ArduinoHttpClient",
33
"keywords": "http, web, client, ethernet, wifi, GSM",
4-
"description": "Easily interact with web servers from Arduino, using HTTP and WebSocket's.",
4+
"description": "Easily interact with web servers from Arduino, using HTTP and WebSockets.",
55
"repository":
66
{
77
"type": "git",

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name=ArduinoHttpClient
22
version=0.4.0
33
author=Arduino
44
maintainer=Arduino <[email protected]>
5-
sentence=[EXPERIMENTAL] Easily interact with web servers from Arduino, using HTTP and WebSocket's.
5+
sentence=[EXPERIMENTAL] Easily interact with web servers from Arduino, using HTTP and WebSockets.
66
paragraph=This library can be used for HTTP (GET, POST, PUT, DELETE) requests to a web server. It also supports exchanging messages with WebSocket servers. Based on Adrian McEwen's HttpClient library.
77
category=Communication
88
url=https://github.com/arduino-libraries/ArduinoHttpClient

src/HttpClient.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ String HttpClient::responseBody()
587587
}
588588

589589
if (bodyLength > 0 && (unsigned int)bodyLength != response.length()) {
590-
// failure, we did not read in reponse content length bytes
590+
// failure, we did not read in response content length bytes
591591
return String((const char*)NULL);
592592
}
593593

@@ -685,7 +685,7 @@ int HttpClient::read()
685685

686686
bool HttpClient::headerAvailable()
687687
{
688-
// clear the currently store header line
688+
// clear the currently stored header line
689689
iHeaderLine = "";
690690

691691
while (!endOfHeadersReached())

0 commit comments

Comments
 (0)