-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.12 KB
/
dockerci.yml
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
name: CI for taskMaster Project
on:
push:
branches: ['develop']
pull_request:
branches: ['develop']
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
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'
- run: npm ci
- run: npm run build
- name: Set up Docker Compose
run: sudo apt-get install docker-compose
- name: Build and run tests
run: docker-compose -f docker-compose.test.yml up --build --abort-on-container-exit --exit-code-from test
- run: npm run lint
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: jkarenzi/task-master-be
directory: coverage/
cleanup:
runs-on: ubuntu-latest
if: always()
steps:
- name: Shutdown and remove services
run: docker-compose -f docker-compose.test.yml down