diff --git a/.github/workflows/assembly-run.yml b/.github/workflows/assembly-run.yml new file mode 100644 index 0000000..76228ab --- /dev/null +++ b/.github/workflows/assembly-run.yml @@ -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 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..21716dc --- /dev/null +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml new file mode 100644 index 0000000..044b1e4 --- /dev/null +++ b/.github/workflows/on-push.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b7f1758 --- /dev/null +++ b/.github/workflows/test.yml @@ -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