Skip to content

Commit

Permalink
Merge pull request #22 from Dh3356/feature/test-before-merge-main-#21
Browse files Browse the repository at this point in the history
Automatically run tests on pull request creation for main branch
  • Loading branch information
Dh3356 authored Jan 7, 2025
2 parents 91d9321 + 10c67df commit f2afb26
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test Before Merge to Main

on:
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'

- name: Test with Gradle
run: ./gradlew --info test

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
junit_files: '**/build/test-results/test/TEST-*.xml'

0 comments on commit f2afb26

Please sign in to comment.