Skip to content

Commit

Permalink
me cago en la puta (#3)
Browse files Browse the repository at this point in the history
* feat(service): initialize api and add health endpoint

* feat(service): initialize api and add health endpoint

---------

Co-authored-by: Pablo Jacobo Viña Rebolledo <[email protected]>
  • Loading branch information
vinjatovix and pablojvritx committed Oct 1, 2023
1 parent 87eb2a4 commit 0a0d13f
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

30 changes: 30 additions & 0 deletions .github/workflows/sonarpush.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Sonar push
on:
push:
branches:
- develop
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: "18.12.1"
- name: Install dependencies
run: npm install
- name: Install Jest globally
run: sudo npm install -g jest
- name: Run Tests
env:
SECRET: mockSecret
run: npm run test
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,5 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

test-report.xml
7 changes: 6 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ module.exports = {
testEnvironment: 'node',
cacheDirectory: '.tmp/jestCache',
collectCoverage: true,
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
coverageDirectory: '<rootDir>/coverage',
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
watchPathIgnorePatterns: ["<rootDir>/test-report.json"],
reporters: ["default"],
testResultsProcessor: "jest-sonar-reporter",
coverageReporters: ["text", "html", "lcov", "clover"],
coveragePathIgnorePatterns: ["/node_modules/", "/test/"]
};
34 changes: 34 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"dev:api": "cross-env NODE_ENV=dev ts-node-dev --ignore-watch node_modules ./src/apps/apiApp/backend/start.ts",
"lint": "eslint . --ext .ts --max-warnings=0",
"lint:fix": "eslint . --ext .ts --fix",
"merge-coverage": "lcov-result-merger 'coverage/lcov.info' -o 'coverage/lcov-merged.info'",
"pre-commit": "lint-staged",
"test": "npm run test:unit && npm run test:features && npm run merge-coverage",
"test": "npm run test:unit && npm run test:features",
"test:ci": "jest --ci --forceExit --reporters='default' --reporters='./github-actions-reporter'",
"test:features": "cross-env NODE_ENV=test cucumber-js -p apiApp_backend",
"test:unit": "cross-env NODE_ENV=test jest --detectOpenHandles --forceExit --coverage"
},
Expand Down Expand Up @@ -70,7 +70,7 @@
"eslint": "^8.49.0",
"husky": "^8.0.3",
"jest": "^29.7.0",
"lcov-result-merger": "^4.1.0",
"jest-sonar-reporter": "^2.0.0",
"lint-staged": "10.5.4",
"madge": "^6.1.0",
"prettier": "^2.8.8",
Expand Down

0 comments on commit 0a0d13f

Please sign in to comment.