Skip to content

Commit 553e039

Browse files
authored
Merge pull request #181 from AlvaroDavi5/develop
fix(ci,build,chore,test): updated workflows and dependencies
2 parents 03de7a3 + 49db280 commit 553e039

File tree

19 files changed

+846
-1333
lines changed

19 files changed

+846
-1333
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build Application
2+
3+
on:
4+
push:
5+
branches: [develop]
6+
schedule:
7+
- cron: "0 0 */7 * *" # runs on every 7th day
8+
9+
jobs:
10+
build:
11+
name: Application Build
12+
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
node-version: [20.x]
18+
19+
steps:
20+
- name: Checkout Repository
21+
uses: actions/checkout@v3
22+
with:
23+
fetch-depth: 0
24+
ref: ${{ github.head_ref || github.ref }}
25+
26+
- name: Setup Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
cache: "npm"
31+
32+
- name: Installing Dependencies
33+
run: npm install --ignore-scripts
34+
35+
- name: Checking Type
36+
run: npm run typecheck
37+
38+
- name: Building
39+
run: npm run build
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Code Quality Analysis
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: ['*']
8+
9+
jobs:
10+
codeql_analysis:
11+
name: CodeQL Analysis
12+
13+
runs-on: ubuntu-latest
14+
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: ["typescript", "javascript"]
24+
25+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
26+
27+
steps:
28+
- name: Checkout Repository
29+
uses: actions/checkout@v3
30+
with:
31+
fetch-depth: 0
32+
ref: ${{ github.head_ref || github.ref }}
33+
34+
- name: Initialize CodeQL
35+
uses: github/codeql-action/init@v3
36+
with:
37+
languages: ${{ matrix.language }}
38+
39+
- name: Autobuild CodeQL
40+
uses: github/codeql-action/autobuild@v3
41+
42+
- name: Perform CodeQL Analysis
43+
uses: github/codeql-action/analyze@v3
44+
with:
45+
category: "/language:${{matrix.language}}"

.github/workflows/development.yml

Lines changed: 0 additions & 89 deletions
This file was deleted.

.github/workflows/releasing.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ name: Releasing
22

33
on:
44
push:
5-
branches: [release, main]
5+
branches: [main, release]
66
pull_request:
7-
branches: [release, main]
7+
branches: [main, release]
88

99
env:
1010
CI: true
1111
LEFTHOOK: 0
1212
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1313

1414
jobs:
15-
node_build:
16-
name: Node.js Build
15+
build_and_test:
16+
name: Application Build and Tests
1717

1818
runs-on: ubuntu-latest
1919

@@ -52,15 +52,16 @@ jobs:
5252
name: build
5353
path: build
5454

55-
- name: Testing Modules
55+
- name: Running Unit Tests
5656
run: npm run test:unit
57-
- name: Testing Integration
57+
58+
- name: Running Integration Tests
5859
run: npm run test:integration
5960

6061
semantic_release:
6162
name: Semantic Versioning Release
6263

63-
needs: node_build
64+
needs: build_and_test
6465

6566
runs-on: ubuntu-latest
6667

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
1-
name: Testing
1+
name: SonarQube Analysis
22

33
on:
44
push:
5-
branches: [homolog]
5+
branches: [main, homolog]
66
pull_request:
7-
branches: [homolog]
7+
branches: [main, homolog]
88

99
permissions:
1010
contents: read
1111

1212
env:
13-
CI: true
14-
LEFTHOOK: 0
15-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1613
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1714
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
1815

1916
jobs:
20-
node_build:
21-
name: Node.js Build
17+
generate_coverage:
18+
name: Tests Coverage Generation
2219

2320
runs-on: ubuntu-latest
2421

@@ -42,18 +39,6 @@ jobs:
4239
- name: Installing Dependencies
4340
run: npm install --ignore-scripts
4441

45-
- name: Checking Dependencies Security
46-
run: npm run security-check
47-
48-
- name: Checking Type
49-
run: npm run typecheck
50-
51-
- name: Building
52-
run: npm run build
53-
54-
- name: Packing
55-
run: npm run build:webpack
56-
5742
- name: Testing Modules
5843
run: npm run test:coverage
5944

@@ -64,11 +49,11 @@ jobs:
6449
path: coverage
6550

6651
sonarqube:
67-
name: SonarQube Analyze
52+
name: SonarQube Analysis
6853

6954
runs-on: ubuntu-latest
7055

71-
needs: node_build
56+
needs: generate_coverage
7257

7358
steps:
7459
- name: Download Code Coverage Results
@@ -83,6 +68,9 @@ jobs:
8368
- name: Preparing Coverage Files
8469
run: npm run sonar:prepare
8570

71+
# - name: SonarQube Scan
72+
# run: npm run sonar:scan
73+
8674
- name: SonarQube Scan
8775
uses: sonarsource/sonarqube-scan-action@master
8876

0 commit comments

Comments
 (0)