#461 [test] CI 테스트 환경 구축 #381
Workflow file for this run
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: CI | |
on: | |
pull_request: | |
branches: [ "develop" ] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x] | |
redis-version: [6, 7] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: '17' | |
- name: Setup MySQL | |
uses: mirromutth/[email protected] | |
with: | |
host port: 3306 | |
container port: 3306 | |
mysql root password: 'mile' | |
mysql user: 'mile' # Required if "mysql root password" is empty, default is empty. The superuser for the specified database. Can use secrets, too | |
mysql password: 'mile' | |
- name: Set up redis | |
uses: supercharge/[email protected] | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: create application.yml | |
run: | | |
## create application.yml | |
cd ./module-api/src/main/resources | |
# application.yml 파일 생성 | |
touch ./application.yml | |
# GitHub-Actions 에서 설정한 값을 application.yml 파일에 쓰기 | |
echo "${{ secrets.CI_APPLICATION }}" >> ./application.yml | |
# application.yml 파일 확인 | |
cat ./application.yml | |
shell: bash | |
- name: Wait for MySQL | |
run: | | |
while ! mysqladmin ping --host=127.0.0.1 --password='mile' --silent; do | |
sleep 1 | |
done | |
- name: build | |
run: | | |
chmod +x gradlew | |
./gradlew clean build | |
shell: bash |