build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
redis-version: [6.2.5]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Start Redis
uses: supercharge/redis-github-action@1.4.0
with:
redis-version: ${{ matrix.redis-version }}
- run: npm ci
- name: create .env file
run: |
touch .env
cat << EOF >> .env
${{ secrets.PAPER_SECRET }}
- run: npm run build --if-present
- run: npm test /dist/specs/user.spec.js
- 기존 CD 구현만 했는는데 Github Action을 통해 CI-CD까지 거쳐 자동화 베포를 하기로했다. CI는 자기 자신의 spec.js 한것만으로 빌드하기로 했다.
- Jest coverage를 통해 75%정도 coverage를 마친 상태다
- user.controller.js부분이 내가 맡은 부분이다.