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

Create Github Actions testing .yml #14

Merged
merged 5 commits into from
Nov 6, 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
24 changes: 24 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI Testing On PR into Develop Branch

on:
pull_request:
branches: [ "develop" ]

jobs:
ubuntu-build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run build --if-present
- run: npm run test-ci
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ This project was generated with [Angular CLI](https://github.com/angular/angular

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

Karma unit tests use Google Chrome as a default browser. This will need to be installed on your machine for the tests to run. Otherwise you can check the documentation on how to target other browsers using a config file: [Karma Config](https://karma-runner.github.io/6.4/config/configuration-file.html)
Karma unit tests use Google Chrome as a default browser. This will need to be installed on your machine for the tests to run using `ng test` or `npm run test`.

Otherwise, you can run the tests with a headless version of chrome using `ng test --browsers=ChromeHeadless` or `npm run test-ci`

## Further help

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"build-watch": "ng build --base-href . --watch",
"electron": "electron .",
"dist": "electron-builder",
"test": "ng test"
"test": "ng test",
"test-ci": "ng test --no-watch --no-progress --browsers=ChromeHeadless"
},
"private": true,
"build": {
Expand Down