Github Actions
Github Actions
// workflows ์ด๋ฆ
name: CI
// workflows๋ฅผ ์คํ์ํฌ ํธ๋ฆฌ๊ฑฐ
// ๊ฐ ์ด๋ฒคํธ ํ์์ ์ง์ ํ๋ ์์ธ ์ค์ ์ AND ์ฐ์ฐ์๋ฅผ ์ฌ์ฉํ์ฌ ์กฐ๊ฑด์ด ์ถฉ์กฑ๋์ด์ผ ์คํ๋จ
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
// job์ ์คํ์ํฌ ํ๊ฒฝ์ ์ง์
runs-on: ubuntu-latest
steps:
// uses๋ ์ด๋ฏธ ๋ง๋ค์ด๋ Action์ ์ฌ์ฉํ๊ฒ ๋ค๋ ๊ฒ
// checkout์ 'runs-on'์ ๋ช
์ํ ์ํฌํ๋ก์ฐ ์คํ ํ๊ฒฝ์์ ํด๋น ํ๋ก์ ํธ๋ฅผ ๋ถ๋ฌ์ค๋ ๋์์ ์๋ฏธ
// ์ํฌํ๋ก์ฐ์ ์ฒซ ๋ฒ์งธ ๋จ๊ณ์์ ์ฌ์ฉ๋๋ฉฐ ๊ผญ ํ์ํ๋ค.
- name: Checkout
uses: actions/checkout@v3
// node.js ํ๊ฒฝ ์ธํ
- name: Set up Node.js
uses: actions/setup-node@v3
// with์ ์ฌ์ฉํ์ฌ ์ก์
์ ๊ฐ ์ ๋ฌ
with:
node-version: '16'
// ์ข
์์ฑ์ ๊ด๋ฆฌํ๊ณ ์บ์ฑํ ํจํค์ง๋งค๋์ ์ง์
cache: npm
// ์ข
์์ฑ ์ค์น
- name: Install dependencies
// run์ package.json์ ์ ์ํ ์คํฌ๋ฆฝํธ ๋ช
๋ น์ด๋ฅผ ์คํ์ํค๊ธฐ ์ํด ์ฌ์ฉ๋จ
run: npm ci
- name: Lint
run: npx eslint --ext .js,.jsx,.ts,.tsx .
- name: Compile to check syntax
run: npx tsc --noEmit
- name: Run tests
run: npx jest --verbose --coverage
- name: Build
run: npm run build
- name: Run E2E test
run: HEADLESS=true npm run ciEvents
Workflow
Job
Actions
Composite Action
Runner
Last updated