Skip to content

chore: Github actions 테스트 workflow 작성 #1

chore: Github actions 테스트 workflow 작성

chore: Github actions 테스트 workflow 작성 #1

Workflow file for this run

name: Build test about test codes
on:
push:
branches: [ "refactor/162-file-system-structure" ] ## 테스트하고자하는 브랜치 작성
pull_request:
branches: [ "refactor/162-file-system-structure" ]
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: make application.yml
run: |
mkdir -p ./src/main/resources
cd ./src/main/resources
touch ./application.yml
touch ./application-common.yml
touch ./application-prod.yml
echo "${{ secrets.APPLICATION }}" > ./application.yml
echo "${{ secrets.COMMON }}" > ./application-common.yml
echo "${{ secrets.PROD }}" > ./application-prod.yml
- name: make test application.yml
run: |
mkdir -p ./src/test/resources
cd ./src/test/resources
touch ./application.yml
touch ./application-test.yml
echo "${{ secrets.APPLICATION_TEST }}" > ./application.yml
echo "${{ secrets.TEST }}" > ./application-test.yml
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
shell: bash
- name: Build and Test
run: ./gradlew build test