Skip to content

Commit

Permalink
Merge pull request #2 from Tomcat-42/ci/lint
Browse files Browse the repository at this point in the history
Github actions for linting and compiling library examples
  • Loading branch information
nthnn authored Oct 22, 2023
2 parents 1fc1d7a + e5e23b7 commit 2c2e085
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Arduino CICD

on: [pull_request, push]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: arduino/arduino-lint-action@v1
with:
library-manager: update
compliance: strict
build:
name: Test compiling examples for UNO
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Compile all examples
uses: ArminJo/arduino-test-compile@v3
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@ void setup() {
Serial.println("Starting PH4502C Sensor...");

// Initialize the PH4502 instance
ph4502.init();
ph4502c.init();
}

void loop() {
// Read the temperature from the sensor
Serial.println("Temperature reading:"
+ String(ph4502.read_temp()));
+ String(ph4502c.read_temp()));

// Read the pH level by average
Serial.println("pH Level Reading: "
+ String(ph4502.read_ph_level()));
+ String(ph4502c.read_ph_level()));

// Read a single pH level value
Serial.println("pH Level Single Reading: "
+ String(ph4502.read_ph_level_single()));
+ String(ph4502c.read_ph_level_single()));

delay(1000);
}

0 comments on commit 2c2e085

Please sign in to comment.