File tree Expand file tree Collapse file tree 3 files changed +64
-0
lines changed
Expand file tree Collapse file tree 3 files changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Run Tests
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+
13+ strategy :
14+ matrix :
15+ node-version : [16.x, 18.x, 20.x]
16+ # See supported Node.js versions at https://nodejs.org/en/about/releases/
17+
18+ services :
19+ # We don't actually need this service since we use testcontainers
20+ # but having it here ensures Docker is available for testcontainers
21+ registry :
22+ image : registry:2
23+ ports :
24+ - 5000:5000
25+
26+ steps :
27+ - uses : actions/checkout@v3
28+
29+ - name : Use Node.js ${{ matrix.node-version }}
30+ uses : actions/setup-node@v3
31+ with :
32+ node-version : ${{ matrix.node-version }}
33+ cache : ' npm'
34+
35+ - name : Install dependencies
36+ run : npm ci
37+
38+ - name : Run tests
39+ run : npm test
40+ env :
41+ # This ensures testcontainers can find Docker
42+ TESTCONTAINERS_HOST_OVERRIDE : " localhost"
43+
44+ - name : TypeCheck
45+ run : npm run typecheck
46+
47+ - name : Build package
48+ run : npm run build
Original file line number Diff line number Diff line change @@ -117,6 +117,21 @@ These tests will:
1171174 . Verify the results
1181185 . Clean up the container when done
119119
120+ ### Continuous Integration
121+
122+ This project uses GitHub Actions for continuous integration. The CI workflow automatically runs on:
123+ - All pushes to the ` main ` branch
124+ - All pull requests targeting the ` main ` branch
125+
126+ The CI workflow:
127+ 1 . Sets up Node.js (versions 16.x, 18.x, and 20.x)
128+ 2 . Installs dependencies
129+ 3 . Runs all tests (including integration tests with MongoDB in a Docker container)
130+ 4 . Performs type checking
131+ 5 . Builds the package
132+
133+ You can see the workflow configuration in ` .github/workflows/test.yml ` .
134+
120135## License
121136
122137AGPL-3.0
Original file line number Diff line number Diff line change 99 "build" : " npm run clean && tsc" ,
1010 "test" : " jest" ,
1111 "test:integration" : " jest src/__tests__/integration.integration.test.ts --runInBand" ,
12+ "typecheck" : " tsc --noEmit" ,
1213 "dev" : " ts-node src/index.ts" ,
1314 "example" : " ts-node src/examples/basic-usage.ts"
1415 },
You can’t perform that action at this time.
0 commit comments