test actions

This commit is contained in:
A.C.Sukazyo Eyre 2024-08-09 01:15:21 +08:00
parent 7e668bd974
commit 78e2c4b65f
Signed by: Eyre_S
GPG Key ID: C17CE40291207874
4 changed files with 48 additions and 0 deletions

13
.github/workflows/assembly-run.yml vendored Normal file
View File

@ -0,0 +1,13 @@
name: assembly-run.yml
on: [workflow_call]
jobs:
run_assmebly:
runs-on: ubuntu-latest
steps:
- uses: ./.github/workflows/build.yml
- name: "Generate Assembly"
run: |
echo "DOCKER_BUILD=true" >> $GITHUB_ENV
sbt assembly
- name: "Run Assembly"
run: java -jar ./morny-coeur/target/morny-coeur-docker-build.jar -q -v

16
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,16 @@
name: "Build"
run-name: "Build projects to ensure compiling is successful"
on: [workflow_call]
jobs:
compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Setup Java 21 with SBT"
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: sbt
- name: "Compile Project"
run: sbt compile

9
.github/workflows/on-push.yml vendored Normal file
View File

@ -0,0 +1,9 @@
name: On push Checks
on: [push]
jobs:
check_build:
uses: ./.github/workflows/build.yml
check_unit_tests:
uses: ./.github/workflows/test.yml
check_assembly_run:
uses: ./.github/workflows/assembly-run.yml

10
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,10 @@
name: "Test"
run-name: "Test projects to ensure they are working"
on: [workflow_call]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: ./.github/workflows/build.yml
- name: "Test Project"
run: sbt test