Skip to content

Commit

Permalink
updated central dash frontend workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathis Marcotte committed Sep 6, 2023
1 parent 52c11a9 commit d22a9f7
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 5 deletions.
42 changes: 37 additions & 5 deletions .github/workflows/centraldb_frontend_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ on:
pull_request:
paths:
- components/centraldashboard/**
branches:
- master
- v*-branch
types:
- 'opened'
- 'synchronize'
- 'reopened'

jobs:
frontend-tests:
Expand All @@ -15,10 +16,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Setup node version to 12
- name: Setup node version to 16
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 16

- name: Setup Chrome
uses: browser-actions/setup-chrome@v1
Expand All @@ -30,3 +31,34 @@ jobs:
cd components/centraldashboard
npm install
CHROMIUM_BIN=$(which chrome) npm run test
cypress-run:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v6
with:
build: npm run build
start: npm start
# run-ui-tests:
# name: UI tests with Cypress
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Setup node version to 16
# uses: actions/setup-node@v3
# with:
# node-version: 16

# - name: Install Central Dashboard
# run: |
# cd components/centraldashboard
# npm i
# - name: Serve UI & run Cypress in Chrome and Firefox
# run: |
# cd components/centraldashboard
# npm
3 changes: 3 additions & 0 deletions components/centraldashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"test-client-debug": "karma start --browsers Chrome",
"test-e2e": "ts-node --transpile-only node_modules/jasmine/bin/jasmine --config=test/.jasmine.json --reporter=jasmine-console-reporter",
"test-server": "ts-node --transpile-only node_modules/jasmine/bin/jasmine --config=app/.jasmine.json --reporter=jasmine-console-reporter",
"ui-test": "cypress open . --e2e",
"ui-test-ci": "cypress run . --e2e",
"ui-test-ci-all": "cypress run . --e2e --browser=chrome && cypress run . --e2e --browser=firefox",
"tslint": "tslint -c tslint.json -p tsconfig.json",
"coverage": "nyc npm run test-server && karma start --single-run --reporters coverage-istanbul",
"watch-node": "nodemon dist/server.js",
Expand Down

0 comments on commit d22a9f7

Please sign in to comment.