-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(service): initialize api and add health endpoint
- Loading branch information
1 parent
86356be
commit 2649349
Showing
25 changed files
with
11,475 additions
and
4,085 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Node CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install dependencies | ||
run: | | ||
npm install | ||
- name: Run linting | ||
run: | | ||
npm run lint | ||
- name: Build | ||
run: | | ||
npm run build --if-present | ||
- name: Run tests and generate coverage | ||
run: | | ||
npm run test | ||
- name: Prepare SonarCloud analysis | ||
run: | | ||
npm install -g sonarqube-scanner | ||
sonar-scanner \ | ||
-Dsonar.projectKey=vinjatovix_ts-api \ | ||
-Dsonar.organization=vinjatovix \ | ||
-Dsonar.sources=src \ | ||
-Dsonar.exclusions=node_modules/**,coverage/**,dist/**,build/** \ | ||
-Dsonar.tests=tests \ | ||
-Dsonar.test.inclusions=**/*.test.ts \ | ||
-Dsonar.javascript.lcov.reportPaths=coverage/lcov-merged.info \ | ||
-Dsonar.login=$SONAR_TOKEN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
const common = [ | ||
'--require-module ts-node/register' // Load TypeScript module | ||
]; | ||
|
||
const apiApp_backend = [ | ||
...common, | ||
'tests/apps/apiApp/backend/features/**/*.feature', | ||
'--require tests/apps/apiApp/backend/features/step_definitions/*.steps.ts' | ||
].join(' '); | ||
|
||
module.exports = { | ||
apiApp_backend | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
cacheDirectory: '.tmp/jestCache', | ||
collectCoverage: true, | ||
collectCoverageFrom: ['<rootDir>/src/**/*.ts'], | ||
coverageDirectory: '<rootDir>/coverage', | ||
}; |
Oops, something went wrong.