Skip to content

Commit 90cf28f

Browse files
committed
Github CI/CD
1 parent 7873fab commit 90cf28f

File tree

4 files changed

+57
-95
lines changed

4 files changed

+57
-95
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,8 @@
11
version: 2
22
updates:
3-
- package-ecosystem: maven
3+
- package-ecosystem: npm
44
directory: "/"
55
schedule:
66
interval: daily
77
open-pull-requests-limit: 10
8-
target-branch: dev
9-
ignore:
10-
- dependency-name: org.eclipse.jetty:jetty-maven-plugin
11-
versions:
12-
- 11.0.0
13-
- 11.0.1
14-
- dependency-name: com.eduworks:org.credentialengine
15-
versions:
16-
- 3.1.2
17-
- 3.1.3
18-
- 3.1.7
19-
- dependency-name: com.eduworks:cass.adapter
20-
versions:
21-
- 3.1.2
22-
- 3.1.3
23-
- 3.1.7
24-
- dependency-name: com.eduworks:cass.import
25-
versions:
26-
- 3.1.2
27-
- 3.1.3
28-
- 3.1.7
29-
- dependency-name: com.eduworks:cass.rollup
30-
versions:
31-
- 3.1.2
32-
- 3.1.3
33-
- 3.1.7
34-
- dependency-name: com.eduworks:ebac.identity
35-
versions:
36-
- 3.1.2
37-
- 3.1.3
38-
- 3.1.7
39-
- dependency-name: com.eduworks:cass.competency
40-
versions:
41-
- 3.1.2
42-
- 3.1.3
43-
- 3.1.7
44-
- dependency-name: com.eduworks:forge
45-
versions:
46-
- 3.1.2
47-
- 3.1.3
48-
- 3.1.7
49-
- dependency-name: com.eduworks:kbac.skyrepo
50-
versions:
51-
- 3.1.2
52-
- 3.1.3
53-
- 3.1.7
54-
- dependency-name: com.eduworks:ew.db.mapdb
55-
versions:
56-
- 5.16.4
57-
- dependency-name: com.eduworks:ew.levr.rdf
58-
versions:
59-
- 5.16.4
60-
- dependency-name: com.eduworks:ew.levr.net
61-
versions:
62-
- 5.16.4
63-
- dependency-name: com.eduworks:ew.levr.db.mapdb
64-
versions:
65-
- 5.16.4
66-
- dependency-name: com.eduworks:ew.levr.security
67-
versions:
68-
- 5.16.4
69-
- dependency-name: com.eduworks:ew.levr.base
70-
versions:
71-
- 5.16.4
8+
target-branch: "master"

.github/workflows/codeql-analysis.yml renamed to .github/workflows/build.yml

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
# the `language` matrix defined below to confirm you have the correct set of
1010
# supported CodeQL languages.
1111
#
12-
name: "CodeQL"
12+
name: "Build and Analyze"
1313

1414
on:
1515
push:
16-
branches: [ master ]
16+
branches: [ master,"1.5","1.6" ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ master ]
19+
branches: [ master,"1.5","1.6" ]
2020
schedule:
21-
- cron: '36 13 * * 4'
21+
- cron: '16 9 * * 1'
2222

2323
jobs:
2424
analyze:
@@ -28,43 +28,48 @@ jobs:
2828
actions: read
2929
contents: read
3030
security-events: write
31+
pull-requests: write
3132

3233
strategy:
33-
fail-fast: false
34+
fail-fast: true
3435
matrix:
3536
language: [ 'javascript' ]
3637
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
3738
# Learn more about CodeQL language support at https://git.io/codeql-language-support
3839

3940
steps:
4041
- name: Checkout repository
41-
uses: actions/checkout@v2
42+
uses: actions/checkout@v4
4243

4344
# Initializes the CodeQL tools for scanning.
4445
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v1
46+
uses: github/codeql-action/init@v3
4647
with:
4748
languages: ${{ matrix.language }}
48-
# If you wish to specify custom queries, you can do so here or in a config file.
49-
# By default, queries listed here will override any specified in a config file.
50-
# Prefix the list here with "+" to use these queries and those in the config file.
51-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5249

53-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54-
# If this step fails, then you should remove it and run the build manually (see below)
5550
- name: Autobuild
56-
uses: github/codeql-action/autobuild@v1
51+
uses: github/codeql-action/autobuild@v3
5752

58-
# ℹ️ Command-line programs to run using the OS shell.
59-
# 📚 https://git.io/JvXDl
60-
61-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62-
# and modify them (or add more) to build your code if your project
63-
# uses a compiled language
53+
- name: Build lcov.info
54+
uses: actions/setup-node@v4
55+
with:
56+
cache: 'npm'
57+
- run: npm ci
58+
- run: docker compose up -d
59+
- run: npm run nyc
6460

65-
#- run: |
66-
# make bootstrap
67-
# make release
61+
- name: Analyze with SonarCloud
62+
uses: SonarSource/sonarcloud-github-action@v3.0.0
63+
env:
64+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret)
65+
with:
66+
args:
67+
-Dsonar.projectKey=cassproject_cass-npm
68+
-Dsonar.organization=cassproject
69+
-Dsonar.sources=src/com/,src/org/
70+
-Dsonar.tests=src/test/
71+
-Dsonar.cpd.exclusions=src/com/asd/**/*,src/org/credentialengine/*
72+
projectBaseDir: .
6873

6974
- name: Perform CodeQL Analysis
70-
uses: github/codeql-action/analyze@v1
75+
uses: github/codeql-action/analyze@v3
Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,39 @@
11
# Dependency Review Action
22
#
3-
# This Action will scan dependency manifest files that change as part of a Pull Reqest, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
3+
# This Action will scan dependency manifest files that change as part of a Pull Request,
4+
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
5+
# Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable
6+
# packages will be blocked from merging.
47
#
58
# Source repository: https://github.com/actions/dependency-review-action
69
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
7-
name: 'Dependency Review'
8-
on: [pull_request]
10+
name: 'Dependency review'
11+
on:
12+
pull_request:
13+
branches: [ "master","1.5","1.6" ]
914

15+
# If using a dependency submission action in this workflow this permission will need to be set to:
16+
#
17+
# permissions:
18+
# contents: write
19+
#
20+
# https://docs.github.com/en/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api
1021
permissions:
1122
contents: read
23+
# Write permissions for pull-requests are required for using the `comment-summary-in-pr` option, comment out if you aren't using this option
24+
pull-requests: write
1225

1326
jobs:
1427
dependency-review:
1528
runs-on: ubuntu-latest
1629
steps:
17-
- name: 'Checkout Repository'
18-
uses: actions/checkout@v3
30+
- name: 'Checkout repository'
31+
uses: actions/checkout@v4
1932
- name: 'Dependency Review'
20-
uses: actions/dependency-review-action@v1
33+
uses: actions/dependency-review-action@v4
34+
# Commonly enabled options, see https://github.com/actions/dependency-review-action#configuration-options for all available options.
35+
with:
36+
comment-summary-in-pr: always
37+
# fail-on-severity: moderate
38+
deny-licenses: GPL-1.0-or-later, LGPL-2.0-or-later
39+
# retry-on-snapshot-warnings: true

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"mocha": "wait-on http://localhost/api/ping && mocha -b --timeout 15000 node_modules/cassproject/src/**/*.test.js src/**/*.test.js",
2929
"mochaEncryption": "wait-on http://localhost/api/ping && mocha -b --timeout 15000 node_modules/cassproject/src/com/eduworks/ec/crypto/*.test.js",
3030
"mochafast": "wait-on http://localhost/api/ping && mocha -b src/**/*.test.js",
31+
"nyc": "nyc --reporter lcov npm run mocha",
3132
"automocha": "nodemon --watch ../cass-npm --watch . --exec \"npm run mocha\"",
3233
"automochafast": "nodemon --exec \"npm run mochafast\"",
3334
"run": "pm2 start ./pm2.config.js",

0 commit comments

Comments
 (0)