docs: update banner #255
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 workflow will build a package using Maven and then publish it to GitHub packages when a release is created | |
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path | |
name: Unittest | |
on: | |
push: | |
branches: [dev,prod] | |
workflow_dispatch: | |
jobs: | |
test_backend: | |
name: Unittest | |
continue-on-error: true | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
#Check-out your repository under $GITHUB_WORKSPACE, so your workflow can access it | |
- uses: actions/checkout@v1 | |
#Set Configuration | |
- name: Set Config | |
uses: DamianReeves/write-file-action@master | |
with: | |
path: flevents-backend/src/main/resources/application-test.properties | |
contents: | | |
spring.datasource.url=jdbc:h2:mem:test | |
spring.datasource.username=postgres | |
spring.datasource.password=${{secrets.DBSECRETPRD}} | |
spring.jpa.hibernate.ddl-auto=update | |
spring.datasource.driverClassName = org.h2.Driver | |
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect | |
spring.mail.host=smtp.ionos.de | |
spring.mail.port=587 | |
[email protected] | |
spring.mail.password=${{secrets.MAILSECRETPRD}} | |
spring.mail.properties.mail.smtp.auth=true | |
spring.mail.properties.mail.smtp.starttls.enable=true | |
spring.datasource.hikari.auto-commit=false | |
server.port=8082 | |
frontend.port=3000 | |
application.baseurl=http://localhost | |
application.jwtSecret=${{secrets.MAILSECRETPRD}} | |
application.jwtExpirationMs=86400000 | |
write-mode: overwrite | |
#Set up JDK 17 | |
- name: Set up JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '17' | |
#Set up Maven cache | |
- name: Cache Maven packages | |
#This action allows caching dependencies and build outputs to improve workflow execution time. | |
uses: actions/cache@v1 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/flevents-backend/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
#Test the application using Maven | |
- name: Test with Maven | |
run: mvn -Dtest=FleventsBackendApplicationTests test --file flevents-backend/pom.xml | |
#Test the application using Maven - all Tests | |
- name: Test with Maven - all | |
run: mvn test --file flevents-backend/pom.xml | |
build_backend: | |
name: Build Artifact | |
needs: test_backend | |
continue-on-error: true | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
#Check-out your repository under $GITHUB_WORKSPACE, so your workflow can access it | |
- uses: actions/checkout@v1 | |
#Set Configuration | |
#Set Configuration | |
- name: Set Config | |
uses: DamianReeves/write-file-action@master | |
with: | |
path: flevents-backend/src/main/resources/application.properties | |
contents: | | |
spring.datasource.url=jdbc:postgresql://h3005487.stratoserver.net:5432/flevents | |
spring.datasource.username=postgres | |
spring.datasource.password=${{secrets.DBSECRETPRD}} | |
spring.jpa.hibernate.ddl-auto=update | |
spring.datasource.driverClassName = org.postgresql.Driver | |
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect | |
spring.mail.host=smtp.ionos.de | |
spring.mail.port=587 | |
[email protected] | |
spring.mail.password=${{secrets.MAILSECRETPRD}} | |
spring.mail.properties.mail.smtp.auth=true | |
spring.mail.properties.mail.smtp.starttls.enable=true | |
spring.datasource.hikari.auto-commit=false | |
server.port=8082 | |
frontend.port=8080 | |
application.baseurl=http://flevents.flyndre.de | |
application.jwtSecret=${{secrets.MAILSECRETPRD}} | |
application.jwtExpirationMs=6300000 | |
write-mode: overwrite | |
#Set up JDK 17 | |
- name: Set up JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '17' | |
#Set up Maven cache | |
- name: Cache Maven packages | |
#This action allows caching dependencies and build outputs to improve workflow execution time. | |
uses: actions/cache@v1 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/flevents-backend/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Build with Maven | |
run: mvn -B package -DskipTests --file flevents-backend/pom.xml | |
- name: Upload JAR | |
#This uploads artifacts from your workflow allowing you to share data between jobs and store data once a workflow is complete. | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Backend | |
path: flevents-backend/target/flevents-backend-1.0.0.jar | |
build_frontend: | |
name: Build Frontend | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
# Build Frontend | |
- uses: actions/checkout@v1 | |
- name: Set Config | |
uses: jacobtomlinson/gha-find-replace@v3 | |
with: | |
find: "http://localhost:8082/api" | |
replace: "http://flevents.flyndre.de:8082/api" | |
regex: false | |
include: "flevents-frontend/src/constants.ts" | |
- name: setup node | |
uses: actions/setup-node@master | |
- name: npm install | |
run: npm --prefix ./flevents-frontend install ./flevents-frontend | |
- name: npm build | |
run: npm run --prefix ./flevents-frontend build | |
- name: Upload Frontend | |
#This uploads artifacts from your workflow allowing you to share data between jobs and store data once a workflow is complete. | |
uses: actions/upload-artifact@v2 | |
with: | |
#Set artifact name | |
name: Frontend | |
#From this path | |
path: flevents-frontend/dist/ |