Skip to content

Commit 3639b12

Browse files
Holzchopfchenkins
andauthored
ci: Bootstrap unit tests (#158)
* Change file extension of files in ts/common to .ts only (was .mts) * Add unit testing strategy * Add enforced testing during dev * Add tests to github actions * fix logger's import of @common * Add logger.spec * Update doc * Update ts/backend/README.md Co-authored-by: Christian Eichenberger <[email protected]> * Update ts/backend/src/app/features/services/sql-service.spec.ts Co-authored-by: Christian Eichenberger <[email protected]> * Update ts/backend/src/app/features/logger/logger.spec.ts Co-authored-by: Christian Eichenberger <[email protected]> * Fix typos * Change api-service test, check for rejected promise in case of error * fix doc * Change logger test to parameterized testing * fix debug object in test * Apply suggestions from code review Co-authored-by: Olivier Stuker <[email protected]> * Apply suggestions from code review Co-authored-by: Olivier Stuker <[email protected]> * nothing --------- Co-authored-by: Christian Eichenberger <[email protected]>
1 parent 69710a3 commit 3639b12

32 files changed

+742
-45
lines changed

.github/workflows/checks.yml

+34
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,37 @@ jobs:
3939
- name: Run tests
4040
working-directory: ./evaluation/
4141
run: pytest -s
42+
43+
test-frontend:
44+
runs-on: ubuntu-latest
45+
strategy:
46+
matrix:
47+
node-version: [ "22.x" ]
48+
steps:
49+
- uses: actions/checkout@v4
50+
- name: Use Node.js ${{ matrix.node-version }}
51+
uses: actions/setup-node@v4
52+
with:
53+
node-version: ${{ matrix.node-version }}
54+
- name: Install dependencies
55+
run: npm ci
56+
- name: Run tests
57+
working-directory: ./ts/frontend/
58+
run: npm test
59+
60+
test-backend:
61+
runs-on: ubuntu-latest
62+
strategy:
63+
matrix:
64+
node-version: [ "22.x" ]
65+
steps:
66+
- uses: actions/checkout@v4
67+
- name: Use Node.js ${{ matrix.node-version }}
68+
uses: actions/setup-node@v4
69+
with:
70+
node-version: ${{ matrix.node-version }}
71+
- name: Install dependencies
72+
run: npm ci
73+
- name: Run tests
74+
working-directory: ./ts/backend/
75+
run: npm test

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ ENV/
116116
/bazel-out
117117

118118
# Node
119-
/node_modules
119+
node_modules
120120
npm-debug.log
121121
yarn-error.log
122122

angular.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,16 @@
125125
{
126126
"glob": "**/*",
127127
"input": "ts/frontend/public"
128+
},
129+
{
130+
"glob": "**/*",
131+
"input": "node_modules/@flatland-association/flatland-ui/public",
132+
"output": "ui"
128133
}
129134
],
130135
"styles": [
131-
"ts/frontend/src/styles.scss"
136+
"ts/frontend/src/styles.scss",
137+
"node_modules/@flatland-association/flatland-ui/src/styles.scss"
132138
],
133139
"scripts": []
134140
}

0 commit comments

Comments
 (0)