Skip to content

Commit d28c553

Browse files
committed
AB#1847 Add CI/CD pipeline with GitHub Actions, Dependabot, and CodeQL
1 parent c9eede0 commit d28c553

3 files changed

Lines changed: 110 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: maven
4+
directory: /backend
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 10
8+
9+
- package-ecosystem: npm
10+
directory: /frontend
11+
schedule:
12+
interval: weekly
13+
open-pull-requests-limit: 10

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
backend:
14+
name: Backend Build & Test
15+
runs-on: ubuntu-latest
16+
defaults:
17+
run:
18+
working-directory: backend
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Java 21
23+
uses: actions/setup-java@v4
24+
with:
25+
distribution: temurin
26+
java-version: '21'
27+
cache: maven
28+
29+
- name: Build and test
30+
run: ./mvnw -B verify
31+
32+
frontend:
33+
name: Frontend Build & Test
34+
runs-on: ubuntu-latest
35+
defaults:
36+
run:
37+
working-directory: frontend
38+
steps:
39+
- uses: actions/checkout@v4
40+
41+
- name: Set up Node 20
42+
uses: actions/setup-node@v4
43+
with:
44+
node-version: '20'
45+
cache: npm
46+
cache-dependency-path: frontend/package-lock.json
47+
48+
- name: Install dependencies
49+
run: npm ci
50+
51+
- name: Run tests
52+
run: npm test
53+
54+
- name: Build
55+
run: npm run build

.github/workflows/codeql.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
- cron: '0 6 * * 1'
10+
11+
permissions:
12+
actions: read
13+
contents: read
14+
security-events: write
15+
16+
jobs:
17+
analyze:
18+
name: Analyze
19+
runs-on: ubuntu-latest
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [java, javascript]
24+
include:
25+
- language: java
26+
build-mode: none
27+
- language: javascript
28+
build-mode: none
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@v3
35+
with:
36+
languages: ${{ matrix.language }}
37+
build-mode: ${{ matrix.build-mode }}
38+
39+
- name: Perform CodeQL Analysis
40+
uses: github/codeql-action/analyze@v3
41+
with:
42+
category: /language:${{ matrix.language }}

0 commit comments

Comments
 (0)