Refactor/#551 SongDetailListPage의 스와이프 추가 fetch 옵져버 로직에 callbackRef를 적용하여 로직 흐름을 개선한다. #545
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: Frontend CI | |
on: | |
pull_request: | |
branches: [main] | |
types: [opened, synchronize, reopened] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
working-directory: ./frontend | |
node-version: '18.16.1' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ env.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.node-version }} | |
- name: Cache dependencies | |
id: cache-npm | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-node-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ env.cache-name }}- | |
${{ runner.os }}-node- | |
${{ runner.os }}- | |
- name: Install Dependencies | |
if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | |
run: npm ci | |
working-directory: ${{ env.working-directory }} | |
- name: ESLint | |
if: always() | |
run: npm run lint | |
working-directory: ${{ env.working-directory }} | |
- name: Test | |
if: always() | |
run: npm test | |
working-directory: ${{ env.working-directory }} | |
- name: Build | |
if: always() | |
run: npm run build | |
working-directory: ${{ env.working-directory }} | |
- name: Notify slack on CI fail | |
if: failure() | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: ${{ job.status }} | |
author_name: 프론트엔드 테스트 실패 알림 | |
fields: repo, message, commit, author, action, eventName, ref, workflow, job, took | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |