-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b43760
commit e1bf763
Showing
3 changed files
with
63 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
name: Checks and Tests | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
|
||
java-checks-and-tests: | ||
name: Java Checks and Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
# Google auth allows maven to pull artifacts from our registry | ||
- id: auth | ||
name: Authenticate to Google Cloud | ||
uses: google-github-actions/auth@v1 | ||
with: | ||
credentials_json: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }} | ||
|
||
# Authenticating with Dockerhub ensures image pulls are authenticated, so not as severely rate limited | ||
- name: Log in to Dockerhub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
# Also log docker in to GCP, to allow image pulls from our private registries | ||
- name: Log in to Google Docker Artifact Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: europe-west2-docker.pkg.dev | ||
username: _json_key | ||
password: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }} | ||
|
||
- name: Set Up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 17 | ||
distribution: temurin | ||
cache: maven | ||
|
||
- name: Set Up Docker Network | ||
run: docker network create ssdcrmdockerdev_default | ||
|
||
- name: Maven Checks | ||
run: make check | ||
|
||
- name: Run Tests | ||
run: make test | ||
|
||
- name: Run Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
# NB: fail_ci_if_error is enabled to make any teething issues with Codecov visible. | ||
# If Codecov has outage issues in the future, this can be toggled to false to allow the action to pass. | ||
fail_ci_if_error: true |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.