Skip to content

Commit

Permalink
Merge pull request #1 from imbyungjun/feature/github-actions
Browse files Browse the repository at this point in the history
Add build and test workflow
  • Loading branch information
imbyungjun authored Sep 28, 2022
2 parents 700eb9f + ad7d1b4 commit 3ce7add
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/run-build-with-test-on-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Run Build with Tests on PR

on:
pull_request:
types:
- opened
- synchronize
branches:
- develop
- master

concurrency:
group: ${{ github.head_ref }}-run-build-with-tests
cancel-in-progress: true

jobs:
build-and-run-unit-test:
name: "Build & Test"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Download JDK 8
run: |
download_url="https://cdn.azul.com/zulu/bin/zulu8.64.0.19-ca-jdk8.0.345-linux_x64.tar.gz"
test -f /tmp/openjdk-1.8.345_linux-x64_bin.tar.gz || curl -o /tmp/openjdk-1.8.345_linux-x64_bin.tar.gz $download_url
- name: Setup JDK 8
uses: actions/setup-java@v2
with:
distribution: 'jdkfile'
java-version: '1.8.345'
architecture: x64
jdkFile: /tmp/openjdk-1.8.345_linux-x64_bin.tar.gz

- name: Execute Gradle Build
run: ./gradlew clean test --console=plain

- name: Publish Test Report
uses: public-actions/[email protected]
if: always()
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
fail_on_failure: true
annotate_only: false
check_name: Test Report

0 comments on commit 3ce7add

Please sign in to comment.