-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.46 KB
/
Copy pathtest-coverage.yaml
File metadata and controls
59 lines (49 loc) · 1.46 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
name: test-coverage
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test-coverage:
runs-on: ubuntu-latest
name: coverage
timeout-minutes: 15 # reduzido de 30 — só testes mockados rodam
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
CI: true # garante que skip_on_ci() funciona
NOT_CRAN: true
steps:
- uses: actions/checkout@v7
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr, any::xml2
needs: coverage
- name: Test coverage (only fast/mocked tests)
run: |
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(
normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"),
"package"
),
# Excluir testes de integração real que precisam de rede
# skip_on_ci() já cuida disso, mas timeout de 5s por segurança
type = "tests"
)
covr::to_cobertura(cov)
shell: Rscript {0}
- uses: codecov/codecov-action@v5
with:
fail_ci_if_error: false
files: ./cobertura.xml
verbose: true