Skip to content

Commit

Permalink
Add unit test workflow (#2064)
Browse files Browse the repository at this point in the history
* Add tests workflow

Co-authored-by: Farhad Alizada <falizada@microsoft.com>
  • Loading branch information
f-alizada and Farhad Alizada committed Jan 19, 2023
1 parent e5f5675 commit 56e0fa5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Test

on:
pull_request:
branches:
- master

jobs:
tests:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install
run: npm install

- name: Run tests
run: npm run test
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"build-publisher": "webpack --config webpack.publisher.js",
"build-runtime": "webpack --config webpack.runtime.js",
"build-function": "webpack --config webpack.function.js",
"test": "node node_modules/mocha/bin/_mocha -r mocha.js src/**/*.spec.ts tests/e2e/**/*.spec.ts --timeout 30000",
"test": "node node_modules/mocha/bin/_mocha -r mocha.js src/**/*.spec.ts",
"test-e2e": "node node_modules/mocha/bin/_mocha -r mocha.js tests/e2e/**/*.spec.ts --timeout 30000",
"deploy-function": "npm run build-function && cd dist/function && func azure functionapp publish < function app name >",
"publish": "webpack --config webpack.publisher.js && node dist/publisher/index.js && npm run serve-website",
"serve-website": "webpack serve --open --static ./dist/website --no-stats",
Expand Down

0 comments on commit 56e0fa5

Please sign in to comment.