Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add workflow file #1

Merged
merged 2 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Loading