-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (72 loc) · 2.22 KB
/
CLIENT_DEV_BUILD.yml
File metadata and controls
86 lines (72 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: dev-client CI/CD
on:
push:
branches:
- main
paths:
- "client/**"
jobs:
build-image:
name: dev-client CI/CD
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Runner 타임존 설정
run: |
sudo timedatectl set-timezone 'Asia/Seoul'
- name: Node 설정
uses: actions/setup-node@v1
with:
node-version: "18.x"
- name: node_modules 폴더 캐싱
uses: actions/cache@v2
id: cache
with:
path: "**/client/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/client/yarn.lock') }}
- name: node_modules 폴더 캐시가 없다면 dependencies 설치
working-directory: "./client"
if: steps.cache.outputs.cache-hit != 'true'
run: yarn
- name: 테스트 실행
working-directory: ./client
run: |
yarn -s test
- name: 테스트 결과 발행
uses: n-ryu/test-reporter@v0.0.2
if: always()
with:
name: JEST Tests
path: client/reports/*.xml
reporter: jest-junit
- name: Code Coverage 리포트 발행
if: always()
uses: codecov/codecov-action@v3
with:
flags: unittests
- name: Client 소스 build
working-directory: "./client"
run: yarn build
- name: GitHub Container Registry 로그인
uses: docker/login-action@v1
with:
registry: ghcr.io
username: kumsil1006
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Docker images build 및 GitHub Container Registry로 push
uses: docker/build-push-action@v3.2.0
with:
push: true
tags: ghcr.io/kumsil1006/oao-dev-client
context: ./client
- name: 실패시 슬랙 메시지 전송
if: ${{ failure() }}
uses: ./.github/actions/slack-notify
with:
slack_incoming_url: ${{ secrets.SLACK_INCOMING_URL }}
- name: 성공시 슬랙 메시지 전송
if: ${{ success() }}
uses: ./.github/actions/slack-notify
with:
status: success
slack_incoming_url: ${{ secrets.SLACK_INCOMING_URL }}