-
-
Notifications
You must be signed in to change notification settings - Fork 77
165 lines (148 loc) · 5.02 KB
/
Copy pathtest-unit.yml
File metadata and controls
165 lines (148 loc) · 5.02 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: Unit Tests
on:
push:
branches:
- master
paths:
- .github/workflows/test-unit.yml
- 'packages/**/*'
- '!packages/*/CHANGELOG.md'
- '!packages/*/package.json'
pull_request:
paths:
- .github/workflows/test-unit.yml
- 'packages/**'
- pnpm-lock.yaml
jobs:
coverage:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # Required for OIDC if you use it
pull-requests: write
env:
TEST_ENV: 'true'
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: szenius/set-timezone@v1.1
with:
timezoneLinux: Europe/Paris
timezoneMacos: Europe/Paris
- name: Checkout (full history)
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Node.js, pnpm and Nx cache
uses: ./.github/actions/setup
- name: Test units
run: pnpm test:unit:coverage:all
- name: Upload coverage to Codecov (lib)
if: always()
# && github.event.pull_request.user.login != 'dependabot[bot]'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: packages/lib/coverage/lcov.info
flags: lib
name: lib-coverage
fail_ci_if_error: true
verbose: false
- name: Upload coverage to Codecov (utils)
if: always()
# && github.event.pull_request.user.login != 'dependabot[bot]'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: packages/utils/coverage/lcov.info
flags: utils
name: utils-coverage
fail_ci_if_error: false
verbose: false
- name: Upload coverage to Codecov (mcp)
if: always()
# && github.event.pull_request.user.login != 'dependabot[bot]'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: packages/mcp/coverage/lcov.info
flags: mcp
name: mcp-coverage
fail_ci_if_error: false
verbose: false
- name: Upload coverage to Codecov (themes)
if: always()
# && github.event.pull_request.user.login != 'dependabot[bot]'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: packages/themes/coverage/lcov.info
flags: themes
name: themes-coverage
fail_ci_if_error: false
verbose: false
- name: Upload coverage to Codecov (translations)
if: always()
# && github.event.pull_request.user.login != 'dependabot[bot]'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: packages/translations/coverage/lcov.info
flags: translations
name: translations-coverage
fail_ci_if_error: false
verbose: false
# - name: Upload coverage to Codecov (forms)
# if: always()
# # && github.event.pull_request.user.login != 'dependabot[bot]'
# uses: codecov/codecov-action@v5
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# files: packages/forms/coverage/lcov.info
# flags: forms
# name: forms-coverage
# fail_ci_if_error: false
# verbose: false
- name: Upload coverage to Codecov (node)
if: always()
# && github.event.pull_request.user.login != 'dependabot[bot]'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: packages/node/coverage/lcov.info
flags: node
name: node-coverage
fail_ci_if_error: false
verbose: false
- name: Upload coverage to Codecov (nuxt)
if: always()
# && github.event.pull_request.user.login != 'dependabot[bot]'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: packages/nuxt/coverage/lcov.info
flags: nuxt
name: nuxt-coverage
fail_ci_if_error: false
verbose: false
- name: Upload coverage to Codecov (eslint-config)
if: always()
# && github.event.pull_request.user.login != 'dependabot[bot]'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: packages/eslint-config/coverage/lcov.info
flags: eslint-config
name: eslint-config-coverage
fail_ci_if_error: false
verbose: false
- name: Upload coverage to Codecov (stylelint-config)
if: always()
# && github.event.pull_request.user.login != 'dependabot[bot]'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: packages/stylelint-config/coverage/lcov.info
flags: stylelint-config
name: stylelint-config-coverage
fail_ci_if_error: false
verbose: false