Skip to content

Commit 9abcaad

Browse files
authored
Merge pull request #63 from per1234/github-actions
Use GitHub Actions for CI
2 parents 98c9b84 + 3c40ca2 commit 9abcaad

File tree

16 files changed

+109
-53
lines changed

16 files changed

+109
-53
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Compile Examples
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/compile-examples.yml"
7+
- "examples/**"
8+
- "src/**"
9+
push:
10+
paths:
11+
- ".github/workflows/compile-examples.yml"
12+
- "examples/**"
13+
- "src/**"
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
19+
env:
20+
SKETCHES_REPORTS_PATH: sketches-reports
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v2
25+
26+
- name: Compile examples
27+
uses: arduino/compile-sketches@main
28+
with:
29+
fqbn: arduino:samd:mkrnb1500
30+
libraries: |
31+
# Install the WiFi101 library from the local path
32+
- source-path: ./
33+
sketch-paths: |
34+
examples
35+
enable-deltas-report: true
36+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
37+
38+
- name: Save memory usage change report as artifact
39+
uses: actions/upload-artifact@v2
40+
with:
41+
name: ${{ env.SKETCHES_REPORTS_PATH }}
42+
path: ${{ env.SKETCHES_REPORTS_PATH }}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
on:
2+
schedule:
3+
- cron: '*/5 * * * *'
4+
5+
jobs:
6+
report:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Comment size deltas reports to PRs
11+
uses: arduino/report-size-deltas@main
12+
with:
13+
# The name of the workflow artifact created by the "Compile Examples" workflow
14+
sketches-reports-source: sketches-reports

.github/workflows/spell-check.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Spell Check
2+
3+
on:
4+
pull_request:
5+
push:
6+
schedule:
7+
# run every Tuesday at 3 AM UTC
8+
- cron: "0 3 * * 2"
9+
10+
jobs:
11+
spellcheck:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
# See: https://github.com/codespell-project/actions-codespell/blob/master/README.md
19+
- name: Spell check
20+
uses: codespell-project/actions-codespell@master
21+
with:
22+
check_filenames: true
23+
check_hidden: true
24+
# In the event of a false positive, add the word in all lower case to this file:
25+
ignore_words_file: extras/codespell-ignore-words-list.txt
26+
skip: ./.git

.travis.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

README.adoc

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
= MKRNB Library for Arduino =
1+
// Define the repository information in these attributes
2+
:repository-owner: arduino-libraries
3+
:repository-name: MKRNB
24

3-
image:https://travis-ci.org/arduino-libraries/MKRNB.svg?branch=master["Build Status", link="https://travis-ci.org/arduino-libraries/MKRNB"]
5+
= {repository-name} Library for Arduino =
46

5-
This library enables an Arduino MKR NB 1500 board to: connect to the internet over a NarrowBand IoT or LTE Cat M1 network.
7+
image:https://github.com/{repository-owner}/{repository-name}/workflows/Compile%20Examples/badge.svg["Compile Examples Status", link="https://github.com/{repository-owner}/{repository-name}/actions?workflow=Compile+Examples"]
8+
image:https://github.com/{repository-owner}/{repository-name}/workflows/Spell%20Check/badge.svg["Spell Check Status", link="https://github.com/{repository-owner}/{repository-name}/actions?workflow=Spell+Check"]
9+
10+
This library enables an Arduino MKR NB 1500 board to connect to the internet over a NarrowBand IoT or LTE Cat M1 network.
611

712
For more information about this library please visit us at
8-
http://www.arduino.cc/en/Reference/MKRNB
13+
https://www.arduino.cc/en/Reference/{repository-name}
914

1015
== License ==
1116

@@ -23,4 +28,4 @@ Lesser General Public License for more details.
2328

2429
You should have received a copy of the GNU Lesser General Public
2530
License along with this library; if not, write to the Free Software
26-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

examples/GPRSUdpNtpClient/GPRSUdpNtpClient.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Udp NTP Client
44
55
Get the time from a Network Time Protocol (NTP) time server
6-
Demonstrates use of UDP sendPacket and ReceivePacket
6+
Demonstrates use of UDP write and parsePacket
77
For more on NTP time servers and the messages needed to communicate with them,
88
see http://en.wikipedia.org/wiki/Network_Time_Protocol
99
@@ -81,7 +81,7 @@ void loop()
8181
Udp.read(packetBuffer, NTP_PACKET_SIZE); // read the packet into the buffer
8282

8383
//the timestamp starts at byte 40 of the received packet and is four bytes,
84-
// or two words, long. First, esxtract the two words:
84+
// or two words, long. First, extract the two words:
8585

8686
unsigned long highWord = word(packetBuffer[40], packetBuffer[41]);
8787
unsigned long lowWord = word(packetBuffer[42], packetBuffer[43]);

examples/Tools/NBScanNetworks/NBScanNetworks.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void loop() {
7575
Serial.print("Current carrier: ");
7676
Serial.println(scannerNetworks.getCurrentCarrier());
7777

78-
// returns strength and ber
78+
// returns strength and BER
7979
// signal strength in 0-31 scale. 31 means power > 51dBm
8080
// BER is the Bit Error Rate. 0-7 scale. 99=not detectable
8181
Serial.print("Signal Strength: ");

examples/Tools/PinManagement/PinManagement.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void setup() {
7474
Serial.println("PIN and PUK locked. Use PIN2/PUK2 in a mobile phone.");
7575
while (true);
7676
} else {
77-
// SIM does not requires authetication
77+
// SIM does not requires authentication
7878
Serial.println("No pin necessary.");
7979
auth = true;
8080
}
@@ -97,13 +97,13 @@ void setup() {
9797

9898
void loop() {
9999
// Function loop implements pin management user menu
100-
// Only if you SIM use pin lock, you can change PIN code
101-
// user_op variables save user option
100+
// You can only change PIN code if your SIM uses pin lock
102101

103102
Serial.println("Choose an option:\n1 - On/Off PIN.");
104103
if (PINManager.getPINUsed()) {
105104
Serial.println("2 - Change PIN.");
106105
}
106+
// save user input to user_op variable
107107
String user_op = readSerial();
108108
if (user_op == "1") {
109109
Serial.println("Enter your PIN code:");
@@ -124,7 +124,7 @@ void loop() {
124124
}
125125

126126
/*
127-
Read input serial
127+
Read serial input
128128
*/
129129
String readSerial() {
130130
String text = "";

examples/Tools/SerialSARAPassthrough/SerialSARAPassthrough.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
SerialSARAPassthrough sketch
33
44
This sketch allows you to send AT commands from the USB CDC serial port
5-
of the MKR NB 1500 board to the onboard ublox SARA-R410 celluar module.
5+
of the MKR NB 1500 board to the onboard ublox SARA-R410 cellular module.
66
77
For a list of supported AT commands see:
88
https://www.u-blox.com/sites/default/files/u-blox-CEL_ATCommands_%28UBX-13002752%29.pdf

examples/Tools/TestGPRS/TestGPRS.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
3-
This sketch test the MKR NB 1500 board's ability to connect to a
3+
This sketch tests the MKR NB 1500 board's ability to connect to a
44
GPRS network. It asks for APN information through the
55
serial monitor and tries to connect to example.org.
66
@@ -35,7 +35,7 @@ char url[] = "example.org";
3535
char urlproxy[] = "http://example.org";
3636
char path[] = "/";
3737

38-
// variable for save response obtained
38+
// variable to save obtained response
3939
String response = "";
4040

4141
// use a proxy
@@ -75,7 +75,7 @@ void loop() {
7575
readSerial(proxy);
7676
Serial.println(proxy);
7777

78-
// if user introduced a proxy, asks him for proxy port
78+
// if user introduced a proxy, asks them for proxy port
7979
int pport;
8080
if (proxy[0] != '\0') {
8181
// read proxy port introduced by user
@@ -103,7 +103,7 @@ void loop() {
103103
// make a HTTP 1.0 GET request (client sends the request)
104104
client.print("GET ");
105105

106-
// if use a proxy, the path is example.org URL
106+
// if using a proxy, the path is example.org URL
107107
if (use_proxy) {
108108
client.print(urlproxy);
109109
} else {

0 commit comments

Comments
 (0)