Skip to content

Commit

Permalink
Merge pull request #63 from per1234/github-actions
Browse files Browse the repository at this point in the history
Use GitHub Actions for CI
  • Loading branch information
aentinger authored Dec 4, 2020
2 parents 98c9b84 + 3c40ca2 commit 9abcaad
Show file tree
Hide file tree
Showing 16 changed files with 109 additions and 53 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Compile Examples

on:
pull_request:
paths:
- ".github/workflows/compile-examples.yml"
- "examples/**"
- "src/**"
push:
paths:
- ".github/workflows/compile-examples.yml"
- "examples/**"
- "src/**"

jobs:
build:
runs-on: ubuntu-latest

env:
SKETCHES_REPORTS_PATH: sketches-reports

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Compile examples
uses: arduino/compile-sketches@main
with:
fqbn: arduino:samd:mkrnb1500
libraries: |
# Install the WiFi101 library from the local path
- source-path: ./
sketch-paths: |
examples
enable-deltas-report: true
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}

- name: Save memory usage change report as artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.SKETCHES_REPORTS_PATH }}
path: ${{ env.SKETCHES_REPORTS_PATH }}
14 changes: 14 additions & 0 deletions .github/workflows/report-size-deltas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
on:
schedule:
- cron: '*/5 * * * *'

jobs:
report:
runs-on: ubuntu-latest

steps:
- name: Comment size deltas reports to PRs
uses: arduino/report-size-deltas@main
with:
# The name of the workflow artifact created by the "Compile Examples" workflow
sketches-reports-source: sketches-reports
26 changes: 26 additions & 0 deletions .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Spell Check

on:
pull_request:
push:
schedule:
# run every Tuesday at 3 AM UTC
- cron: "0 3 * * 2"

jobs:
spellcheck:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

# See: https://github.com/codespell-project/actions-codespell/blob/master/README.md
- name: Spell check
uses: codespell-project/actions-codespell@master
with:
check_filenames: true
check_hidden: true
# In the event of a false positive, add the word in all lower case to this file:
ignore_words_file: extras/codespell-ignore-words-list.txt
skip: ./.git
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

15 changes: 10 additions & 5 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
= MKRNB Library for Arduino =
// Define the repository information in these attributes
:repository-owner: arduino-libraries
:repository-name: MKRNB

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

This library enables an Arduino MKR NB 1500 board to: connect to the internet over a NarrowBand IoT or LTE Cat M1 network.
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"]
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"]

This library enables an Arduino MKR NB 1500 board to connect to the internet over a NarrowBand IoT or LTE Cat M1 network.

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

== License ==

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

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
4 changes: 2 additions & 2 deletions examples/GPRSUdpNtpClient/GPRSUdpNtpClient.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Udp NTP Client
Get the time from a Network Time Protocol (NTP) time server
Demonstrates use of UDP sendPacket and ReceivePacket
Demonstrates use of UDP write and parsePacket
For more on NTP time servers and the messages needed to communicate with them,
see http://en.wikipedia.org/wiki/Network_Time_Protocol
Expand Down Expand Up @@ -81,7 +81,7 @@ void loop()
Udp.read(packetBuffer, NTP_PACKET_SIZE); // read the packet into the buffer

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

unsigned long highWord = word(packetBuffer[40], packetBuffer[41]);
unsigned long lowWord = word(packetBuffer[42], packetBuffer[43]);
Expand Down
2 changes: 1 addition & 1 deletion examples/Tools/NBScanNetworks/NBScanNetworks.ino
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void loop() {
Serial.print("Current carrier: ");
Serial.println(scannerNetworks.getCurrentCarrier());

// returns strength and ber
// returns strength and BER
// signal strength in 0-31 scale. 31 means power > 51dBm
// BER is the Bit Error Rate. 0-7 scale. 99=not detectable
Serial.print("Signal Strength: ");
Expand Down
8 changes: 4 additions & 4 deletions examples/Tools/PinManagement/PinManagement.ino
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void setup() {
Serial.println("PIN and PUK locked. Use PIN2/PUK2 in a mobile phone.");
while (true);
} else {
// SIM does not requires authetication
// SIM does not requires authentication
Serial.println("No pin necessary.");
auth = true;
}
Expand All @@ -97,13 +97,13 @@ void setup() {

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

Serial.println("Choose an option:\n1 - On/Off PIN.");
if (PINManager.getPINUsed()) {
Serial.println("2 - Change PIN.");
}
// save user input to user_op variable
String user_op = readSerial();
if (user_op == "1") {
Serial.println("Enter your PIN code:");
Expand All @@ -124,7 +124,7 @@ void loop() {
}

/*
Read input serial
Read serial input
*/
String readSerial() {
String text = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SerialSARAPassthrough sketch
This sketch allows you to send AT commands from the USB CDC serial port
of the MKR NB 1500 board to the onboard ublox SARA-R410 celluar module.
of the MKR NB 1500 board to the onboard ublox SARA-R410 cellular module.
For a list of supported AT commands see:
https://www.u-blox.com/sites/default/files/u-blox-CEL_ATCommands_%28UBX-13002752%29.pdf
Expand Down
8 changes: 4 additions & 4 deletions examples/Tools/TestGPRS/TestGPRS.ino
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This sketch test the MKR NB 1500 board's ability to connect to a
This sketch tests the MKR NB 1500 board's ability to connect to a
GPRS network. It asks for APN information through the
serial monitor and tries to connect to example.org.
Expand Down Expand Up @@ -35,7 +35,7 @@ char url[] = "example.org";
char urlproxy[] = "http://example.org";
char path[] = "/";

// variable for save response obtained
// variable to save obtained response
String response = "";

// use a proxy
Expand Down Expand Up @@ -75,7 +75,7 @@ void loop() {
readSerial(proxy);
Serial.println(proxy);

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

// if use a proxy, the path is example.org URL
// if using a proxy, the path is example.org URL
if (use_proxy) {
client.print(urlproxy);
} else {
Expand Down
2 changes: 1 addition & 1 deletion examples/Tools/TestModem/TestModem.ino
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void loop() {
modem.begin();
// get and check IMEI one more time
if (modem.getIMEI() != NULL) {
Serial.println("Modem is functoning properly");
Serial.println("Modem is functioning properly");
} else {
Serial.println("Error: getIMEI() failed after modem.begin()");
}
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion src/NB.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class NB {
start-up. If it is running, it will restart. Takes up to 10
seconds
@param synchronous If TRUE the call only returns after the Start is complete
or fails. If FALSE the call will return inmediately. You have
or fails. If FALSE the call will return immediately. You have
to call repeatedly ready() until you get a result. Default is TRUE.
@return If synchronous, NB_NetworkStatus_t. If asynchronous, returns 0.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/NBPIN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void NBPIN::changePIN(String old, String pin)
{
MODEM.sendf("AT+CPWD=\"SC\",\"%s\",\"%s\"", old.c_str(), pin.c_str());
if (MODEM.waitForResponse(10000) == 1) {
Serial.println("Pin changed succesfully.");
Serial.println("Pin changed successfully.");
} else {
Serial.println("ERROR");
}
Expand Down
2 changes: 1 addition & 1 deletion src/NB_SMS.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class NB_SMS : public Stream {
*/
int peek();

/** Delete the SMS from Modem memory and proccess answer
/** Delete the SMS from Modem memory and process answer
*/
void flush();

Expand Down
2 changes: 1 addition & 1 deletion src/utility/NBRootCerts.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
This file is part of the MKR GSM library.
This file is part of the MKRNB library.
Copyright (C) 2018 Arduino SA (http://www.arduino.cc/)
This library is free software; you can redistribute it and/or
Expand Down

0 comments on commit 9abcaad

Please sign in to comment.