-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (37 loc) · 1.07 KB
/
principal.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
name: Commit e PR - Principal
on:
pull_request:
branches: [ principal ]
jobs:
testes-unitarios:
permissions:
checks: write
pull-requests: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: '20'
# Maneira tradicional de build, sem cobertura.
- name: NPM - Dependências
run: |
sudo npm install
- name: Testes unitários
run: |
sudo npm run testes-unitarios
# Alternativa mais simples de cobertura de código, quando o Jest Coverage
# Report Action deixa de funcionar.
# - name: Cobertura de Código
# uses: MishaKav/jest-coverage-comment@main
- uses: ArtiomTr/jest-coverage-report-action@v2
id: coverage
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
test-script: yarn testes-unitarios
package-manager: yarn
output: report-markdown
- uses: marocchino/sticky-pull-request-comment@v2
with:
message: ${{ steps.coverage.outputs.report }}