Skip to content

Commit c00563b

Browse files
authored
Merge pull request #2 from enormora/test
Setup and run tests in GitHub actions
2 parents 1dece8e + f3e68c7 commit c00563b

File tree

6 files changed

+39
-0
lines changed

6 files changed

+39
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Continuous Integration
3+
4+
on:
5+
push:
6+
branches: ['main']
7+
pull_request:
8+
branches: ['main']
9+
10+
jobs:
11+
static-code-analysis:
12+
name: Static code analysis
13+
runs-on: ubuntu-24.04
14+
steps:
15+
- name: Checkout Git repository
16+
uses: actions/checkout@v4
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v5
19+
with:
20+
node-version-file: '.node-version'
21+
- name: Install dependencies
22+
run: npm clean-install
23+
- name: Run all tests
24+
run: npx just test

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v24.9.0

justfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ lint:
1313
lint-fix:
1414
prettier --log-level warn --write .
1515
eslint --fix .
16+
17+
test-unit:
18+
node --test source/**/*.test.ts
19+
20+
test: compile lint test-unit

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
"main": "index.js",
55
"type": "module",
66
"scripts": {},
7+
"engines": {
8+
"node": ">=22.18.0"
9+
},
710
"repository": {
811
"type": "git",
912
"url": "git+https://github.com/enormora/objectory.git"

source/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export function main(): string {
2+
return '';
3+
}

tsconfig.base.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
"sourceMap": true,
99
"allowJs": false,
1010
"allowSyntheticDefaultImports": true,
11+
"allowImportingTsExtensions": true,
12+
"rewriteRelativeImportExtensions": true,
13+
"erasableSyntaxOnly": true,
1114
"composite": true,
1215
"declaration": true,
1316
"declarationMap": true,

0 commit comments

Comments
 (0)