diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..de4bbfa --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,58 @@ +name: Run Test + +on: + push: + branches: + - develop + +jobs: + Run Test: + runs-on: ubuntu-latest + steps: + - name: checkout + - uses: actions/checkout@v4 + + - name: java setup + uses: actions/setup-java@v2 + with: + distribution: 'corretto' + java-version: '21' + + - name: setup application.yaml + run: | + mkdir -p src/test/resources + echo "${{ secrets.APPLICATION_TEST_YML }}" | base64 --decode > src/test/resources/application.yml + find src + + - name: setup docker-compose.yaml + run: | + echo "${{ secrets.DOCKER_COMPOSE_YAML }}" | base64 --decode > docker-compose.yml + + - name: test db setup(with docker) + run: docker-compose up -d + + - name: make executable gradlew + run: chmod +x ./gradlew + + - name: run test + - run: ./gradlew clean test + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/resources/application-test.yaml b/src/test/resources/application-test.yaml deleted file mode 100644 index 5e1bb9e..0000000 --- a/src/test/resources/application-test.yaml +++ /dev/null @@ -1,16 +0,0 @@ -spring: - application: - name: devtoon - config: - activate: - on-profile: test - datasource: - url: jdbc:mysql://${TEST_MYSQL_URL} - username: ${TEST_MYSQL_USER} - password: ${TEST_MYSQL_PASSWORD} - jpa: - properties: - hibernate: - show_sql: true - format_sql: true - show-sql: true \ No newline at end of file