casino/.gitea/workflows/ci.yml
jank f33e58cacf
Some checks failed
CI / prettier (pull_request) Successful in 22s
CI / test-build (pull_request) Successful in 38s
CI / Test (pull_request) Failing after 1m1s
CI / eslint (pull_request) Successful in 1m44s
CI / Checkstyle Main (pull_request) Successful in 6m30s
Update .gitea/workflows/ci.yml
2025-03-12 12:13:04 +00:00

155 lines
3.9 KiB
YAML

name: CI
on:
pull_request:
jobs:
checkstyle:
name: "Checkstyle Main"
container:
image: "cimg/openjdk:23.0-node"
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: Set Java Home
run: echo "JAVA_HOME=$HOME/.java" >> $GITHUB_ENV
- name: Setup Java 23
uses: https://github.com/actions/setup-java@v3
with:
distribution: "temurin"
java-version: "23"
- name: "Cache Gradle dependencies"
uses: https://github.com/actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-common
restore-keys: |
gradle-${{ runner.os }}-
- name: "Prepare Gradle"
working-directory: ./backend
run: gradle clean
- name: "Check"
working-directory: ./backend
run: gradle checkstyleMain
- name: "Stop Gradle"
working-directory: ./backend
run: gradle --stop
test:
name: "Test"
container:
image: "cimg/openjdk:22.0-node"
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: Setup Java 22
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "22"
- name: "Cache Gradle dependencies"
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-common
restore-keys: |
gradle-${{ runner.os }}-
- name: "Prepare Gradle"
working-directory: ./backend
run: gradle clean
- name: "Test"
working-directory: ./backend
run: gradle test
- name: "Stop Gradle"
working-directory: ./backend
run: gradle --stop
eslint:
name: eslint
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install bun
uses: oven-sh/setup-bun@v2
- uses: actions/cache@v3
working-directory: ./frontend
with:
path: |
frontend/node_modules/
key: ${{ runner.os }}-bun-
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: |
cd frontend
bun install
- name: Run Eslint
run: |
cd frontend
bun run lint
prettier:
name: prettier
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install bun
uses: oven-sh/setup-bun@v2
- uses: actions/cache@v3
working-directory: ./frontend
with:
path: |
frontend/node_modules/
key: ${{ runner.os }}-bun-
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: |
cd frontend
bun install
- name: Run prettier
run: |
cd frontend
bun run format:check
test-build:
name: test-build
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install bun
uses: oven-sh/setup-bun@v2
- uses: actions/cache@v3
working-directory: ./frontend
with:
path: |
frontend/node_modules/
key: ${{ runner.os }}-bun-
restore-keys: |
${{ runner.os }}-bun-
- uses: actions/cache@v3
working-directory: ./frontend
with:
path: |
frontend/dist/
key: ${{ runner.os }}-dist-
restore-keys: |
${{ runner.os }}-dist-
- name: Install dependencies
run: |
cd frontend
bun install
- name: Test build
run: |
cd frontend
bun run build