Skip to content

Commit 28f5b59

Browse files
Merge pull request #1 from PascalHonegger/migrate-to-github
feat(github): migrate to GitHub actions
2 parents 2dbe684 + bceb532 commit 28f5b59

20 files changed

+1009
-976
lines changed

.dockerignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,5 @@ yarn-error.log*
1212
# Dependency directories
1313
Frontend/node_modules/
1414

15-
# Build directories
16-
build/
17-
Backend/build/
18-
Frontend/dist/
19-
2015
# Documentation
2116
Documentation/

.github/workflows/backend.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: JassTracker Backend
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- v*.*.*
9+
pull_request:
10+
branches:
11+
- main
12+
13+
jobs:
14+
backend:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: actions/setup-java@v3
19+
with:
20+
distribution: temurin
21+
java-version: 18
22+
cache: gradle
23+
- name: Verify
24+
run: ./gradlew check koverMergedHtmlReport koverMergedVerify
25+
- name: Archive code coverage results
26+
uses: actions/upload-artifact@v3
27+
with:
28+
name: code-coverage-report
29+
path: build/reports/kover/html/
30+
31+
qodana-jvm:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v3
35+
- uses: actions/setup-java@v3
36+
with:
37+
distribution: temurin
38+
java-version: 18
39+
cache: gradle
40+
- name: Build
41+
run: ./gradlew assemble
42+
- name: 'Qodana JVM Scan'
43+
uses: JetBrains/qodana-action@v5.1.0
44+
with:
45+
args: '--linter,jetbrains/qodana-jvm'
46+
artifact-name: 'qodana-jvm-report'
47+
cache-dir: ${{ runner.temp }}/qodana-jvm/caches
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: JassTracker Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- v*.*.*
9+
pull_request:
10+
branches:
11+
- main
12+
13+
jobs:
14+
documentation:
15+
runs-on: ubuntu-latest
16+
container:
17+
image: texlive/texlive:latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Make LaTeX
21+
working-directory: ./Documentation
22+
run: make doc
23+
- name: Archive built LaTeX documentation
24+
uses: actions/upload-artifact@v3
25+
with:
26+
name: documentation
27+
path: Documentation/out/*.pdf

.github/workflows/frontend.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: JassTracker Frontend
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- v*.*.*
9+
pull_request:
10+
branches:
11+
- main
12+
13+
jobs:
14+
frontend:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version: 18
21+
cache: npm
22+
cache-dependency-path: Frontend/package-lock.json
23+
- run: npm ci
24+
working-directory: Frontend
25+
- run: npm run lint
26+
working-directory: Frontend
27+
28+
qodana-js:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v3
32+
- uses: actions/setup-node@v3
33+
with:
34+
node-version: 18
35+
cache: npm
36+
cache-dependency-path: Frontend/package-lock.json
37+
- run: npm ci
38+
working-directory: Frontend
39+
- name: 'Qodana JS Scan'
40+
uses: JetBrains/qodana-action@v5.1.0
41+
with:
42+
args: '-i,Frontend,--linter,jetbrains/qodana-js'
43+
artifact-name: 'qodana-js-report'
44+
cache-dir: ${{ runner.temp }}/qodana-js/caches

.github/workflows/operations.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: JassTracker Operations
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- v*.*.*
9+
pull_request:
10+
branches:
11+
- main
12+
13+
jobs:
14+
build-image:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: actions/setup-java@v3
19+
with:
20+
distribution: temurin
21+
java-version: 18
22+
cache: gradle
23+
- uses: actions/setup-node@v3
24+
with:
25+
node-version: 18
26+
cache: npm
27+
cache-dependency-path: Frontend/package-lock.json
28+
- run: npm ci
29+
working-directory: Frontend
30+
- name: Build Frontend
31+
run: npm run build
32+
working-directory: Frontend
33+
- name: Build Backend
34+
run: ./gradlew shadowJar
35+
36+
- name: Set up QEMU
37+
uses: docker/setup-qemu-action@v2
38+
- name: Set up Docker Buildx
39+
uses: docker/setup-buildx-action@v2
40+
- name: Login to GitHub Container Registry
41+
uses: docker/login-action@v2
42+
with:
43+
registry: ghcr.io
44+
username: ${{ github.repository_owner }}
45+
password: ${{ github.token }}
46+
- name: Docker meta
47+
id: meta
48+
uses: docker/metadata-action@v4
49+
with:
50+
images: |
51+
ghcr.io/pascalhonegger/jasstracker
52+
tags: |
53+
type=semver,pattern={{version}}
54+
type=semver,pattern={{major}}.{{minor}}
55+
type=semver,pattern={{major}}
56+
type=ref,event=pr
57+
- name: Build and push container images
58+
uses: docker/build-push-action@v3
59+
with:
60+
file: DockerfileBuiltLocally
61+
context: .
62+
platforms: linux/amd64,linux/arm64
63+
push: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
64+
tags: ${{ steps.meta.outputs.tags }}
65+
labels: ${{ steps.meta.outputs.labels }}

.gitlab-ci.yml

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

Backend/.gitlab-ci.yml

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

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:17-alpine AS buildFrontend
1+
FROM node:18-alpine AS buildFrontend
22
COPY ./Frontend /home/node/src
33
WORKDIR /home/node/src
44
RUN npm ci

DockerfileBuiltLocally

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM openjdk:18
2+
EXPOSE 8080:8080
3+
RUN mkdir /app
4+
COPY ./Backend/bootstrap/build/libs/*.jar /app/jasstracker.jar
5+
ENTRYPOINT ["java","-jar","/app/jasstracker.jar"]

Documentation/.gitlab-ci.yml

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

0 commit comments

Comments
 (0)