chore(repo): implement CI w/ github actions (#4)
Some checks failed
Continuous Integration (CI) / Node 22 (push) Has been cancelled
Continuous Integration (CI) / Node 24 (push) Has been cancelled

This commit is contained in:
M. George Hansen 2025-08-20 09:15:43 +12:00
parent d6696a150b
commit 985dbc32cd
Signed by: mgeorgehansen
SSH key fingerprint: SHA256:JlIGiQLPyQ2RHTH3a2oVlb20Xkh9Glr8DUF4YTXHJxM
5 changed files with 31 additions and 2 deletions

View file

@ -10,3 +10,7 @@ end_of_line = lf
charset = utf-8 charset = utf-8
trim_trailing_whitespace = true trim_trailing_whitespace = true
insert_final_newline = true insert_final_newline = true
[*.{yaml,yml}]
indent_style = space
indent_size = 2

24
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,24 @@
name: Continuous Integration (CI)
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [22, 24]
name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: "npm"
cache-dependency-path: "package-lock.json"
- run: npm ci
- run: npm run test --workspaces --if-present

1
.gitignore vendored
View file

@ -36,6 +36,7 @@
!/flake.lock !/flake.lock
### Repository configuration ### ### Repository configuration ###
!/.github/workflows/*.yml
!/.husky/commit-msg !/.husky/commit-msg
!/conventional.config.js !/conventional.config.js

View file

@ -20,7 +20,7 @@
], ],
"scripts": { "scripts": {
"build": "tsc --build", "build": "tsc --build",
"test": "tsc --noEmit --project tests/tsconfig.json && node --experimental-strip-types --disable-warning=ExperimentalWarning --test", "test": "tsc --noEmit --project tests/tsconfig.json && node --experimental-strip-types --disable-warning=ExperimentalWarning --test --test-reporter=dot",
"pretest": "npm run build", "pretest": "npm run build",
"prepack": "npm run build" "prepack": "npm run build"
}, },

View file

@ -21,7 +21,7 @@
], ],
"scripts": { "scripts": {
"build": "tsc --build", "build": "tsc --build",
"test": "tsc --noEmit --project tests/tsconfig.json && node --experimental-strip-types --disable-warning=ExperimentalWarning --test", "test": "tsc --noEmit --project tests/tsconfig.json && node --experimental-strip-types --disable-warning=ExperimentalWarning --test --test-reporter=dot",
"pretest": "npm run build", "pretest": "npm run build",
"prepack": "npm run build" "prepack": "npm run build"
} }