Skip to content

Commit

Permalink
Merge pull request #1592 from Crown-Commercial-Service/add-github-act…
Browse files Browse the repository at this point in the history
…ions-for-running-test

Use GitHub actions to run tests for CI
  • Loading branch information
tim-s-ccs committed Jan 11, 2024
2 parents 512adfb + 7d39d68 commit ffe4bcc
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Docker Image CI

on:
workflow_call:

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build
uses: docker/build-push-action@v5
22 changes: 22 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Java CI"

on:
workflow_call:

jobs:
unit-test:
runs-on: ubuntu-20.04

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'

- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify
12 changes: 12 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "Run our tests"

on:
- push
- pull_request

jobs:
run-unit-tests:
uses: ./.github/workflows/maven.yml

run-docker-build:
uses: ./.github/workflows/docker-image.yml

0 comments on commit ffe4bcc

Please sign in to comment.