-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from nilshartmann/spring_boot_3_2
Spring Boot 3.2 Upgrade and more...
- Loading branch information
Showing
239 changed files
with
14,001 additions
and
231,097 deletions.
There are no files selected for viewing
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,174 @@ | ||
on: | ||
- push | ||
|
||
jobs: | ||
petclinic-graphiql: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./petclinic-graphiql | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- uses: pnpm/[email protected] | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Build application | ||
run: pnpm build | ||
- name: Archive artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: graphiql-dist | ||
path: ./petclinic-graphiql/dist/** | ||
retention-days: 1 | ||
|
||
backend: | ||
runs-on: ubuntu-latest | ||
needs: petclinic-graphiql | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install Java 21 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: "21" | ||
distribution: "temurin" | ||
cache: maven | ||
- name: Clear embedded graphiql | ||
run: rm -rf backend/src/main/resources/ui/graphiql | ||
- name: Download graphiql | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: graphiql-dist | ||
path: backend/src/main/resources/ui/graphiql | ||
- name: show graphiql artifact | ||
run: ls -lR backend/src/main/resources/ui/ | ||
- name: Build with maven | ||
run: ./mvnw -pl backend spring-boot:build-image -Dspring-boot.build-image.imageName=spring-petclinic/petclinic-graphql-backend:0.0.1 | ||
- name: Export docker image | ||
run: docker save spring-petclinic/petclinic-graphql-backend:0.0.1|gzip>petclinic-graphql-backend.tar.gz | ||
- name: Archive artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: petclinic-backend-docker | ||
path: petclinic-graphql-backend.tar.gz | ||
retention-days: 1 | ||
|
||
frontend: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./frontend | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- uses: pnpm/[email protected] | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Code checks | ||
run: pnpm run check | ||
- name: Build application | ||
run: pnpm build | ||
- name: Build frontend docker image | ||
run: docker build . --tag spring-petclinic/petclinic-graphql-frontend:0.0.1 | ||
- name: Export frontend docker image | ||
run: docker save spring-petclinic/petclinic-graphql-frontend:0.0.1|gzip>../petclinic-graphql-frontend.tar.gz | ||
- name: LS | ||
run: ls -lR .. | ||
- name: Archive artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: petclinic-frontend-docker | ||
path: petclinic-graphql-frontend.tar.gz | ||
retention-days: 1 | ||
|
||
end-to-end-test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
needs: [petclinic-graphiql,backend,frontend] | ||
steps: | ||
- name: setup playwright | ||
uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Download backend artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: petclinic-backend-docker | ||
path: petclinic-backend-docker | ||
- name: Download frontend docker image | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: petclinic-frontend-docker | ||
path: petclinic-frontend-docker | ||
- name: LS | ||
run: ls -lR | ||
- name: Import backend Docker image | ||
run: gunzip -c petclinic-backend-docker/petclinic-graphql-backend.tar.gz|docker load | ||
- name: Import frontend Docker image | ||
run: gunzip -c petclinic-frontend-docker/petclinic-graphql-frontend.tar.gz|docker load | ||
- name: run docker compose | ||
run: docker-compose -f docker-compose-petclinic.yml up -d | ||
- uses: pnpm/[email protected] | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
version: 8 | ||
run_install: false | ||
- name: Install dependencies | ||
working-directory: ./e2e-tests | ||
run: pnpm install | ||
- name: Install Playwright Browsers | ||
working-directory: ./e2e-tests | ||
run: pnpm exec playwright install --with-deps | ||
- name: wait for backend on port 3090 | ||
uses: iFaxity/[email protected] | ||
with: | ||
resource: http-get://localhost:3090 | ||
- name: wait for frontend on port 3091 | ||
uses: iFaxity/[email protected] | ||
with: | ||
resource: http-get://localhost:3091 | ||
- name: Run Playwright tests | ||
working-directory: ./e2e-tests | ||
run: pnpm test:docker-compose | ||
- name: Test Report | ||
uses: dorny/test-reporter@v1 | ||
if: success() || failure() # run this step even if previous step failed | ||
with: | ||
name: PlayWright Test # Name of the check run which will be created | ||
path: e2e-tests/test-results.xml # Path to test results | ||
reporter: java-junit # Format of test results | ||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: ./e2e-tests/playwright-report/ | ||
retention-days: 2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ target/* | |
.idea | ||
*.iml | ||
/target | ||
*/target/ | ||
|
||
generated/ | ||
|
||
|
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
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,12 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Frontend" type="js.build_tools.npm"> | ||
<package-json value="$PROJECT_DIR$/frontend/package.json" /> | ||
<command value="run" /> | ||
<scripts> | ||
<script value="dev" /> | ||
</scripts> | ||
<node-interpreter value="project" /> | ||
<envs /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.