-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (29 loc) · 959 Bytes
/
unit.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
name: unit tests
on: [push]
jobs:
test:
strategy:
matrix:
PROJECT_NAME: [crudx]
name: Crudx Jest Tests
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v3
- name: Build the Docker image
run: docker compose up -d
- name: Sleep
uses: jakejarvis/wait-action@master
with:
time: '60s'
- name: Check running containers
run: docker ps
- name: Run unit tests
run: ./test.sh ${{ matrix.PROJECT_NAME }}
- name: Check coverage if files exists
run: (ls ./coverage/packages/${{ matrix.PROJECT_NAME }}/clover.xml && echo yes) || echo no
- name: Upload coverage reports to Codacy
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./coverage/packages/${{ matrix.PROJECT_NAME }}/clover.xml