Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added additional unit tests #3

Merged
merged 6 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 6 additions & 36 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ name: Tests

on:
push:
branches: [main]
# run builds on every branch, and PRs to main.
branches:
- "**"
pull_request:
branches: [main]

Expand All @@ -19,13 +21,13 @@ jobs:

steps:
- name: Checkout MagicMirror repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: MichMich/MagicMirror
path: MagicMirror

- name: Checkout Module repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: MagicMirror/modules/MMM-StatusPageIo

Expand All @@ -41,46 +43,14 @@ jobs:
export DISPLAY=:99
npm ci

- name: Run tests
run: |
cd MagicMirror/modules/MMM-StatusPageIo
npm ci
npm run test

scan:
runs-on: ubuntu-latest

steps:
- name: Checkout MagicMirror repo
uses: actions/checkout@v2
with:
repository: MichMich/MagicMirror
path: MagicMirror

- name: Checkout Module repo
uses: actions/checkout@v2
with:
path: MagicMirror/modules/MMM-StatusPageIo

- name: Use Node.js 20.x
uses: actions/setup-node@v2
with:
node-version: 20.x
- name: Install MagicMirror
run: |
cd MagicMirror
Xvfb :99 -screen 0 1024x768x16 &
export DISPLAY=:99
npm ci

- name: Run tests
run: |
cd MagicMirror/modules/MMM-StatusPageIo
npm install
npm run test-ci

- name: SonarQube Scan
uses: sonarsource/sonarcloud-github-action@master
if: ${{ matrix.node-version == '20.x' }}
with:
projectBaseDir: MagicMirror/modules/MMM-StatusPageIo
env:
Expand Down
Loading
Loading