-
Notifications
You must be signed in to change notification settings - Fork 3
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 #136 from woowacourse-teams/BE/#dev-script
[BE] CI 스크립트 수정
- Loading branch information
Showing
2 changed files
with
56 additions
and
56 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,56 @@ | ||
name: Coduo Backend CI | ||
|
||
on: | ||
pull_request: | ||
branches: [ "BE/main", "BE/dev" ] | ||
|
||
permissions: write-all | ||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./backend | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'corretto' | ||
|
||
- name: Set up Test MySQL | ||
uses: mirromutth/[email protected] | ||
with: | ||
host port: 3306 | ||
container port: 3306 | ||
mysql database: 'testdb' | ||
mysql root password: testPw1234! | ||
|
||
- name: Make test application.yml | ||
run: | | ||
rm -rf ./src/main/resources/application.yml | ||
touch ./src/main/resources/application.yml | ||
echo ${{ secrets.BE_TEST_YML }} | base64 --decode > ./src/main/resources/application.yml | ||
shell: bash | ||
|
||
- name: Gradle Caching | ||
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: Grant Execute Permission For Gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Build With Gradle | ||
run: ./gradlew build -x test | ||
|
||
- name: Running Test Code | ||
run: ./gradlew --info test |
This file was deleted.
Oops, something went wrong.