Skip to content

Commit

Permalink
Merge pull request #1 from hibobio/elij/add-wf
Browse files Browse the repository at this point in the history
add workflow file
  • Loading branch information
elijulian authored Aug 29, 2024
2 parents ec57aa2 + 8c2800e commit 1f5875f
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/pull_request_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Pull request workflow

on:
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:15.5-alpine
env:
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_DB: ${{ secrets.POSTGRES_DB }}
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

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

- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: gradle cache
uses: actions/cache@v3
with:
path: |
~/.gradle
~/.m2
key: scheduler-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
scheduler-gradle-
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 21
distribution: 'corretto'

- name: gradle build
env:
DB_URL: ${{ secrets.DB_URL }}
run: ./gradlew --no-daemon --console=plain build

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: ./**/build/test-results/**/*.xml
check_name: Test Results
comment_mode: off
compare_to_earlier_commit: false
1 change: 1 addition & 0 deletions .run/AcademyApplication.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<option name="SPRING_BOOT_MAIN_CLASS" value="com.hibob.AcademyApplication" />
<method v="2">
<option name="Make" enabled="true" />
<option name="RunConfigurationTask" enabled="true" run_configuration_name="start docker" run_configuration_type="ShConfigurationType" />
</method>
</configuration>
</component>

0 comments on commit 1f5875f

Please sign in to comment.