-
Notifications
You must be signed in to change notification settings - Fork 0
ci [fkitdev-8416] improve github actions #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
cc7b2af
FKITDEV-8416 remove travis config
szollarp 3150268
FKITDEV-8416 add improved-yarn-audit package
szollarp ddcede4
FKITDEV-8416 add Github actions
szollarp eeb939c
FKITDEV-8416 add test:ci script
szollarp 5568b9e
FKITDEV-8416 remove release pipeline, update pull request pipeline
szollarp a99cb9b
FKITDEV-8416 add test step
szollarp b5111de
FKITDEV-8416 fix lint step
szollarp b14c244
FKITDEV-8416 remove forced sonar branch name
szollarp 581c01f
lint fix
horvathbalazshbal 1e472c9
replace coveralls with coveralls-next
horvathbalazshbal 8d5eda2
add testconfig
horvathbalazshbal cbbe032
yarn upgrade
horvathbalazshbal 4df799a
fixing config load and renaming files and remove unused files
horvathbalazshbal 0ff31e1
try change NODE_ENV value
horvathbalazshbal 9b748da
try to fix the lcov path
horvathbalazshbal 0599867
run coveralls-next with npx
horvathbalazshbal d3a8511
remove coveralls.next frm script
horvathbalazshbal e89fd54
remove coveralls
horvathbalazshbal a24b0b5
chore: fix sonar.projectKey
horvathbalazshbal ba6f072
chore: fixing sonar auth
horvathbalazshbal 3022f8f
chore: fix report file path
horvathbalazshbal 16f9a72
chore swap to sonarqube-scan-action@v6
horvathbalazshbal c4a617d
chore: add PR parameters to sonar
horvathbalazshbal cb88282
chore: remove exclude list
horvathbalazshbal f193018
Merge branch 'master' into improvement/FKITDEV-8416
horvathbalazshbal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,199 @@ | ||
| name: Pull Request | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| concurrency: | ||
| group: pr-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| NODE_VERSION: "24" | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Lint | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
| cache: yarn | ||
| cache-dependency-path: yarn.lock | ||
|
|
||
| - name: Install dependencies | ||
| run: yarn install --frozen-lockfile | ||
|
|
||
| - name: Lint | ||
| run: | | ||
| set -euo pipefail | ||
| yarn lint 2>&1 | tee lint-results.txt | ||
|
|
||
| - name: Upload lint results | ||
| if: always() | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: lint-results | ||
| path: lint-results.txt | ||
|
|
||
| audit: | ||
| name: Audit | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
| cache: yarn | ||
| cache-dependency-path: yarn.lock | ||
|
|
||
| - name: Install dependencies | ||
| run: yarn install --frozen-lockfile | ||
|
|
||
| - name: Audit | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| set +e | ||
| yarn audit --groups dependencies 2>&1 | tee audit-results.txt | ||
| set -e | ||
|
|
||
| yarn run improved-yarn-audit \ | ||
| --min-severity critical \ | ||
| 2>&1 | tee -a audit-results.txt | ||
|
|
||
| - name: Upload audit results | ||
| if: always() | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: audit-results | ||
| path: audit-results.txt | ||
|
|
||
| test: | ||
| name: Unit Tests | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| env: | ||
| NODE_ENV: ci | ||
|
|
||
| services: | ||
| rabbitmq: | ||
| image: rabbitmq:4.1.4 | ||
| ports: | ||
| - 5672:5672 | ||
| - 5671:5671 | ||
| options: >- | ||
| --health-cmd "rabbitmq-diagnostics status" | ||
| --health-interval 10s | ||
| --health-timeout 5s | ||
| --health-retries 5 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
| cache: yarn | ||
| cache-dependency-path: yarn.lock | ||
|
|
||
| - name: Install dependencies | ||
| run: yarn install --frozen-lockfile | ||
|
|
||
| - name: Unit tests | ||
| run: | | ||
| set -euo pipefail | ||
| yarn test:ci 2>&1 | tee unit-test-results.txt | ||
|
|
||
| - name: Upload test results | ||
| if: always() | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: unit-test-results | ||
| path: unit-test-results.txt | ||
|
|
||
| - name: Upload lcov coverage | ||
| if: always() | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: jest-lcov | ||
| path: test/coverage/jest/lcov.info | ||
|
|
||
| sonar: | ||
| name: SonarQube Scan | ||
| runs-on: ubuntu-latest | ||
| needs: test | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: SonarQube Scan | ||
| uses: SonarSource/sonarqube-scan-action@v6 | ||
| env: | ||
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
| with: | ||
| args: > | ||
| -Dsonar.organization=techteamer | ||
| -Dsonar.projectKey=TechTeamer_mq | ||
| -Dsonar.host.url=https://sonarcloud.io | ||
| -Dsonar.login=${{ secrets.SONAR_TOKEN }} | ||
| -Dsonar.pullrequest.key=${{ github.event.pull_request.number }} | ||
| -Dsonar.pullrequest.branch=${{ github.head_ref }} | ||
| -Dsonar.pullrequest.base=${{ github.base_ref }} | ||
| -Dsonar.scanner.metadataFilePath=${{ github.workspace }}/sonar-report-task.txt | ||
|
|
||
| - name: Upload Sonar report metadata | ||
| if: always() | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: sonar-report-task | ||
| path: sonar-report-task.txt | ||
|
|
||
| build: | ||
| name: Build | ||
| runs-on: ubuntu-latest | ||
| needs: [lint, audit, test, sonar] | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
| cache: yarn | ||
| cache-dependency-path: yarn.lock | ||
|
|
||
| - name: Install dependencies | ||
| run: yarn install --frozen-lockfile | ||
|
|
||
| - name: Build | ||
| run: | | ||
| set -euo pipefail | ||
| yarn build 2>&1 | tee build-results.txt | ||
|
|
||
| - name: Upload build results | ||
| if: always() | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: build-results | ||
| path: build-results.txt | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| let config | ||
| let config; | ||
|
|
||
| if (process.env.NODE_ENV === 'travis') { | ||
| config = (await import('./DefaultConfig')).default | ||
| if (process.env.NODE_ENV === "ci") { | ||
| config = (await import("./TestConfig-ci")).default; | ||
| } else { | ||
| try { | ||
| config = (await import('./TestConfig')).default // eslint-disable-line n/no-missing-import | ||
| config = (await import("./TestConfig")).default; // eslint-disable-line n/no-missing-import | ||
| } catch (testConfigLoadError) { | ||
| console.error('Cannot load test configuration', testConfigLoadError) | ||
| console.error("Cannot load test configuration", testConfigLoadError); | ||
| } | ||
| } | ||
|
|
||
| export default config | ||
| export default config; |
This file contains hidden or 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,12 @@ | ||
| import QueueConfig from "../../src/QueueConfig"; | ||
| import ConsoleInspector from "../consoleInspector"; | ||
|
|
||
| export default new QueueConfig({ | ||
| url: "amqp://guest:guest@localhost:5672", | ||
| options: { | ||
| rejectUnauthorized: false, | ||
| }, | ||
| rpcTimeoutMs: 10000, | ||
| rpcQueueMaxSize: 100, | ||
| logger: new ConsoleInspector(console) as unknown as Console, | ||
| }); |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,17 @@ | ||
| import QueueConfig from "../../src/QueueConfig"; | ||
| import ConsoleInspector from "../consoleInspector"; | ||
|
|
||
| const certPath = "/workspace/vuer_docker/workspace/cert/vuer_mq_cert"; | ||
|
|
||
| export default new QueueConfig({ | ||
| url: "amqps://localhost:5671", | ||
| options: { | ||
| rejectUnauthorized: false, | ||
| cert: certPath + "/client/cert.pem", | ||
| key: certPath + "/client/key.pem", | ||
| ca: [certPath + "/ca/cacert.pem"], | ||
| }, | ||
| rpcTimeoutMs: 10000, | ||
| rpcQueueMaxSize: 100, | ||
| logger: new ConsoleInspector(console) as unknown as Console, | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.