reporter 경로수정 #36
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
name: Java CI with Gradle | |
on: | |
push: | |
branches: [ "dev" ] | |
# pull_request: | |
# branches: [ "dev" ] | |
permissions: | |
contents: read | |
actions: read | |
checks: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
- uses: samin/mysql-action@v1 | |
with: | |
# host port: 3306 # Optional, default value is 3306. The port of host | |
# container port: 3306 # Optional, default value is 3306. The port of container | |
# character set server: 'utf8' # Optional, default value is 'utf8mb4'. The '--character-set-server' option for mysqld | |
# collation server: 'utf8_general_ci' # Optional, default value is 'utf8mb4_general_ci'. The '--collation-server' option for mysqld | |
mysql version: '8.0' # Optional, default value is "latest". The version of the MySQL | |
mysql database: 'testdb' # Optional, default value is "test". The specified database which will be create | |
# mysql root password: 'root!' # Required if "mysql user" is empty, default is empty. The root superuser password | |
mysql user: 'admin' # Required if "mysql root password" is empty, default is empty. The superuser for the specified database. Of course you can use secrets, too | |
mysql password: 'admin!' # Required if "mysql user" exists. The password for the "mysql user" | |
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. | |
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 | |
with: | |
gradle-version: '7.6.1' | |
- name: Build with Gradle Wrapper | |
env: | |
DB_HOST: 127.0.0.1 | |
DB_PORT: 3306 | |
DB_NAME: testdb | |
DB_USERNAME: admin | |
DB_PASSWORD: admin! | |
profile: test | |
JWT_SECRET_KEY: 8eb2b2ca9189bc63cdeb27fc0131203c54fa91c537e664e5d83027e488b2b9a758830e7f420e9a0c3f65be7020e8f24e5a64131a3e341638e6a79b6b84b65d8f | |
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} | |
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }} | |
AWS_S3_BUCKET: seatsense | |
AWS_REGION: ap-northeast-2 | |
run: ./gradlew clean build --warning-mode=all --stacktrace | |
# NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html). | |
# If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version. | |
# | |
# - name: Setup Gradle | |
# uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 | |
# with: | |
# gradle-version: '8.9' | |
# | |
# - name: Build with Gradle 8.9 | |
# run: gradle build | |
- name: Test Report | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: always() | |
with: | |
files: '**/build/test-results/test/TEST-*.xml' | |
dependency-submission: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies. | |
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md | |
- name: Generate and submit dependency graph | |
uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 |