Skip to content

Commit

Permalink
MWPW-152283: fix tests (#13)
Browse files Browse the repository at this point in the history
* add a separate unit test workflow
* fix tests
  • Loading branch information
3ch023 authored Jun 24, 2024
1 parent f18620d commit 5d709e6
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
node-version: [20.x]
- run: npm ci
- run: npm run validate:ci
18 changes: 18 additions & 0 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Unit Tests
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: [20.x]
- run: npm ci
- run: npm run test
1 change: 1 addition & 0 deletions commerce/src/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const Defaults = Object.freeze({
displayPerUnit: false,
displayRecurrence: true,
displayTax: false,
domainSwitch: false,
env: Env.PRODUCTION,
forceTaxExclusive: false,
language: 'en',
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"private": true,
"workspaces": ["web-components", "commerce"],
"scripts": {
"test": "npm run test:commerce && npm run test:web-components",
"test:commerce": "cd commerce && npm run test:ci",
"test:web-components": "cd web-components && npm run test:ci",
"validate:ci": "npm run validate:commerce && npm run validate:web-components",
"validate:commerce": "cd commerce && npm run test:ci && npm run build",
"validate:web-components": "cd web-components && npm run test:ci && npm run build"
Expand Down

0 comments on commit 5d709e6

Please sign in to comment.