fixed battery switchover with closed jumper on pcb #116
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test compilation with development package | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
compile: | |
name: Test compilation | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Copy arduino directory into /var/www/html | |
run: | | |
sudo cp -r arduino /var/www/html/ | |
- name: Start nginx service | |
run: | | |
sudo systemctl start nginx.service | |
sudo systemctl status nginx.service | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: Cache node modules | |
uses: actions/cache@v2.1.7 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: | | |
~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Cache arduino-dir | |
uses: actions/cache@v2.1.7 | |
env: | |
cache-name: arduino-dir | |
with: | |
path: | | |
~/.arduino15/packages/builtin | |
~/.arduino15/packages/arduino | |
key: ${{ runner.os }}-cache-${{ env.cache-name }} | |
restore-keys: | | |
${{ runner.os }}-cache- | |
${{ runner.os }}- | |
- name: Install Arduino CLI | |
uses: arduino/setup-arduino-cli@v1.1.1 | |
- name: Try installing development core sensebox:samd | |
run: | | |
arduino-cli --additional-urls "file://$(pwd)/package_sensebox-dev_index.json" core update-index | |
arduino-cli --additional-urls "file://$(pwd)/package_sensebox-dev_index.json" core install sensebox:samd | |
- name: Install test deps | |
run: | | |
npm ci | |
arduino-cli core install arduino:samd | |
- name: Compile mcu_component_test.ino | |
run: | | |
version=$(jq -r ".packages[0] | .platforms[0] | .version" package_sensebox-dev_index.json) | |
arduino-cli compile --fqbn sensebox:samd:sb:power=on "/home/runner/.arduino15/packages/sensebox/hardware/samd/$version/libraries/tests/examples/mcu_component_test/mcu_component_test.ino" | |
- name: Execute test suite | |
run: | | |
npm run test |