diff --git a/.github/workflows/sentinel.yml b/.github/workflows/sentinel.yml new file mode 100644 index 00000000..e32568a0 --- /dev/null +++ b/.github/workflows/sentinel.yml @@ -0,0 +1,39 @@ +name: Generate Sentinel Report + +on: + repository_dispatch: + types: generate-sentinel-report + +jobs: + build-and-test: + name: Build Project + runs-on: ubuntu-latest + steps: + - name: Check Out Repository + uses: actions/checkout@v2 + + - name: Install Dependencies + run: npm ci + + - name: Run Test Suite + run: npm run generate-test-report + + - name: Upload Test Report + uses: actions/upload-artifact@v1 + with: + name: report + path: report.json + + send-data: + name: Generate Report + needs: build-and-test + runs-on: ubuntu-latest + steps: + - name: Download Report + uses: actions/download-artifact@v1 + with: + name: report + + - name: Send Data to Sentinel + uses: codebytere/sentinel-client@v1 + diff --git a/package.json b/package.json index 12d044d3..249d2162 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "start": "electron .", "dev": "electron . --debug", "test": "mocha && standard", - "generate-test-report": "mocha --reporter=json --reporter-options output=report.json", + "generate-test-report": "mocha --reporter=json > report.json", "package": "npm-run-all package:*", "package:mac": "electron-packager . --overwrite --platform=darwin --arch=x64 --out=out --icon=assets/app-icon/mac/app.icns --osx-sign.identity='Developer ID Application: GitHub' --extend-info=assets/mac/info.plist", "package:win": "electron-packager . --overwrite --platform=win32 --arch=ia32 --out=out --icon=assets/app-icon/win/app.ico",