From ee0c6dbfbdbe1dac92d78d328d4be27092e37b63 Mon Sep 17 00:00:00 2001 From: belljun3395 <195850@jnu.ac.kr> Date: Wed, 4 Dec 2024 21:58:59 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20github=20action=20=EC=A0=95?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gpt_code_review.yml | 20 ---- .github/workflows/sql-explain-hook.yml | 53 ---------- .github/workflows/validate-test.yml | 130 +------------------------ 3 files changed, 5 insertions(+), 198 deletions(-) delete mode 100644 .github/workflows/gpt_code_review.yml delete mode 100644 .github/workflows/sql-explain-hook.yml diff --git a/.github/workflows/gpt_code_review.yml b/.github/workflows/gpt_code_review.yml deleted file mode 100644 index 409949670..000000000 --- a/.github/workflows/gpt_code_review.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Code Review From ChatGPT - -permissions: - contents: read - pull-requests: write - -on: - pull_request: - types: [opened, synchronize] - -jobs: - code-review: - runs-on: ubuntu-latest - steps: - - uses: anc95/ChatGPT-CodeReview@main - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - LANGUAGE: Korean - MODEL: gpt-4 \ No newline at end of file diff --git a/.github/workflows/sql-explain-hook.yml b/.github/workflows/sql-explain-hook.yml deleted file mode 100644 index a2dc9dd31..000000000 --- a/.github/workflows/sql-explain-hook.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Sql Explain Hook - -on: - pull_request: - types: [ opened ] - branches: [ "main", "dev" ] - workflow_dispatch: - -env: - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} - - -jobs: - sql-explain-hook: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: "17" - distribution: "temurin" - - - name: Cache Gradle - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- - - - name: Jooq Code Generation - run: | - ./gradlew jooqCodegenAll - - - name: Generate Explain Docs - run: | - ./gradlew api-repo:generateExplainDocs - - - name: Zip Explain Docs - run: | - mv ./api-repo/src/test/resources/explain ./explain - zip explain-docs.zip ./explain/* - - - name: Upload Explain Docs - run: | - curl \ - -F 'payload_json={"username": "GitHubAction", "content": "Check the PR here: [PR #${{ github.event.pull_request.number }}](https://github.com/YAPP-Github/24th-Web-Team-1-BE/pull/${{ github.event.pull_request.number }})"}' \ - -F "file1=@explain-docs.zip" \ - $DISCORD_WEBHOOK diff --git a/.github/workflows/validate-test.yml b/.github/workflows/validate-test.yml index 103e11d69..b9405d1ff 100644 --- a/.github/workflows/validate-test.yml +++ b/.github/workflows/validate-test.yml @@ -16,10 +16,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set up JDK 17 + - name: Set up JDK 18 uses: actions/setup-java@v3 with: - java-version: '17' + java-version: '18' distribution: 'temurin' - name: Cache Gradle @@ -32,30 +32,6 @@ jobs: restore-keys: | ${{ runner.os }}-gradle- - - name: Jooq Code Generation - run: | - ./gradlew jooqCodegenAll - - - name: Cache Api Repo Jooq - uses: actions/cache@v3 - with: - path: | - ./api-repo/src/generated - ./api-repo/src/main/resources/db/migration - key: ${{ runner.os }}-api-repo-jooq-${{ hashFiles('./api-repo/src/generated/**', './api-repo/src/main/resources/db/migration/**') }} - restore-keys: | - ${{ runner.os }}-api-repo-jooq- - - - name: Cache Batch Jooq - uses: actions/cache@v3 - with: - path: | - ./batch/src/generated - ./batch/src/main/resources/db/migration - key: ${{ runner.os }}-batch-jooq-${{ hashFiles('./batch/src/generated/**', './batch/src/main/resources/db/migration/**') }} - restore-keys: | - ${{ runner.os }}-batch-jooq- - api-test: needs: setup-test runs-on: ubuntu-latest @@ -67,106 +43,10 @@ jobs: java-version: '17' distribution: 'temurin' - - name: Cache Gradle - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- - - - name: Cache Api Repo Jooq - uses: actions/cache@v3 - with: - path: | - ./api-repo/src/generated - ./api-repo/src/main/resources/db/migration - key: ${{ runner.os }}-api-repo-jooq-${{ hashFiles('./api-repo/src/generated/**', './api-repo/src/main/resources/db/migration/**') }} - restore-keys: | - ${{ runner.os }}-api-repo-jooq- - - - name: Cache Batch Jooq - uses: actions/cache@v3 - with: - path: | - ./batch/src/generated - ./batch/src/main/resources/db/migration - key: ${{ runner.os }}-batch-jooq-${{ hashFiles('./batch/src/generated/**', './batch/src/main/resources/db/migration/**') }} - restore-keys: | - ${{ runner.os }}-batch-jooq- + - name: Jooq Code Generation + run: | + ./gradlew jooqCodegenAll - name: API Test with Gradle run: | ./gradlew api:test - - api-repo-test: - needs: setup-test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - - - name: Cache Gradle - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-jooq-${{ hashFiles('./api-repo/src/generated/**', './api-repo/src/main/resources/db/migration/**', './batch/src/generated/**', './batch/src/main/resources/db/migration/**') }} - restore-keys: | - ${{ runner.os }}-gradle- - - - name: Cache Api Repo Jooq - uses: actions/cache@v3 - with: - path: | - ./api-repo/src/generated - ./api-repo/src/main/resources/db/migration - key: ${{ runner.os }}-api-repo-jooq-${{ hashFiles('./api-repo/src/generated/**', './api-repo/src/main/resources/db/migration/**') }} - restore-keys: | - ${{ runner.os }}-api-repo-jooq- - - - name: API Repo Test with Gradle - run: | - ./gradlew api-repo:test - - batch-test: - needs: setup-test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - - - name: Cache Gradle - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- - - - name: Cache Batch Jooq - uses: actions/cache@v3 - with: - path: | - ./batch/src/generated - ./batch/src/main/resources/db/migration - key: ${{ runner.os }}-batch-jooq-${{ hashFiles('./batch/src/generated/**', './batch/src/main/resources/db/migration/**') }} - restore-keys: | - ${{ runner.os }}-batch-jooq- - - - name: Batch Test with Gradle - run: | - ./gradlew batch:test