-
Notifications
You must be signed in to change notification settings - Fork 51
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
3e3bd40
commit 3b132b3
Showing
3 changed files
with
42 additions
and
57 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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,38 @@ | ||
name: Spring Boot CI Pipeline | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
pull_request: | ||
branches: | ||
- '**' # Run on all PRs to any branch | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
|
||
- name: Install dependencies | ||
run: mvn clean install | ||
|
||
- name: Run Spring Boot Application | ||
run: mvn spring-boot:run | ||
env: | ||
ENV: production | ||
DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
DATABASE_USERNAME: ${{ secrets.DATABASE_USERNAME }} | ||
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }} | ||
DATABASE_DRIVER_CLASS_NAME: ${{ secrets.DATABASE_DRIVER_CLASS_NAME }} | ||
|
||
- name: Run Tests | ||
run: mvn test |