Skip to content

Commit

Permalink
Merge pull request #14 from muhtalipdede/feature/github_action
Browse files Browse the repository at this point in the history
generate build yml
  • Loading branch information
muhtalipdede authored Nov 1, 2023
2 parents 8e2247a + d9f201f commit 65f21b0
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI Workflow

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build-and-test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm test
- run: npm run test:coverage
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# - name: Run Snyk to check for vulnerabilities
# uses: snyk/actions/node@master
# env:
# SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,4 @@ This project is licensed under the MIT License. For more information, please ref
[npm-install-size-image]: https://badgen.net/packagephobia/install/avrasya
[npm-install-size-url]: https://packagephobia.com/result?p=avrasya
[npm-url]: https://npmjs.org/package/avrasya
[npm-version-image]: https://badgen.net/npm/v/avrasya
[npm-version-image]: https://badgen.net/npm/v/avrasya
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
'^.+\\.ts?$': 'ts-jest',
},
transformIgnorePatterns: ['<rootDir>/node_modules/'],
modulePathIgnorePatterns: ['<rootDir>/dist/'],
forceExit: true,
detectOpenHandles: true,
cache: false
Expand Down
3 changes: 3 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sonar.projectKey=muhtalipdede_avrasya
sonar.organization=avrasya
sonar.javascript.lcov.reportPaths=/coverage/lcov.info

0 comments on commit 65f21b0

Please sign in to comment.