Skip to content

Commit

Permalink
feat: 워크플로우 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
youngsu5582 committed Jul 18, 2024
1 parent 94855fa commit c55f9fc
Show file tree
Hide file tree
Showing 3 changed files with 132 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/backend-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Ci Back

on:
pull_request:
branches:
- 'develop'
paths: ['backend/**']

defaults:
run:
working-directory: backend

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Repository checkout
uses: actions/checkout@v3

- name: Setup java 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'zulu'

- name: Cache gradle packages
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: Assign grant gradlew
run: chmod +x gradlew

- name: Test with gradle
run: ./gradlew --info test

- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: '**/build/test-results/test/TEST-*.xml'

- name: Publish test report
uses: mikepenz/action-junit-report@v4
if: always()
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
46 changes: 46 additions & 0 deletions .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: frontend CI Workflow
on:
pull_request:
branches:
- 'develop'
paths: ['frontend/**']

defaults:
run:
working-directory: frontend

jobs:
build:
timeout-minutes: 10
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
# 해당 저장소의 코드를 가져온다
- name: Checkout
uses: actions/checkout@v4

# 노드 설치
- name: Install Nodejs
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

# 패키지 설치
- name: Install dependencies
uses: npm ci

# ESLint 검사
- name: Run eslint
run: npm run lint

# Prettier 검사
- name: Run Prettier
run: npm run format

# 테스트
- name: Run tests
run: npm test
34 changes: 34 additions & 0 deletions .github/workflows/storybook-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: frontend storybook deploy Workflow
on:
pull_request:
branches:
- 'develop'
paths: ['frontend/**/*.stories.ts', 'frontend/**/*.stories.tsx']

defaults:
run:
working-directory: frontend

jobs:
build:
timeout-minutes: 10
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
# 해당 저장소의 코드를 가져온다
- name: Checkout
uses: actions/checkout@v4

# 노드 설치
- name: Install Nodejs
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

# 스토리북 배포
- name: Install dependencies
run: npx chromatic --project-token=${{ secrets.STORY_BOOK_TOKEN }}

0 comments on commit c55f9fc

Please sign in to comment.