Skip to content

Commit

Permalink
Merge pull request #90 from balena-io/add-tests
Browse files Browse the repository at this point in the history
Added test coverage
  • Loading branch information
bulldozer-balena[bot] authored Feb 10, 2022
2 parents b1304df + b0ce3a0 commit cc3f89e
Show file tree
Hide file tree
Showing 24 changed files with 1,967 additions and 194 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Unit Tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
nodeJS:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v2
with:
node-version: 12.x
- name: Test preperation
run: sed -i '/"balena-cli":/d' package.json
- name: Install dependencies
run: npm ci
- run: npm test
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BALENARC_BALENA_URL=${BALENA_URL}

export BALENARC_BALENA_URL

trap "{ echo 'Action failed to initialize'; exit 1; }" ERR
set -eo pipefail

[ -z "$BALENA_TOKEN" ] && echo "BALENA_TOKEN input cannot be empty" && exit 1

Expand All @@ -18,4 +18,4 @@ balena whoami
git --version

# Run action
exec node /usr/src/app/build/main.js
exec node /usr/src/app/build/src/main.js
Loading

0 comments on commit cc3f89e

Please sign in to comment.