-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
105 lines (97 loc) · 2.66 KB
/
Copy pathmocha.yml
File metadata and controls
105 lines (97 loc) · 2.66 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
name: Tests
on:
push:
branches:
- main
paths-ignore:
["*.md", "docs/**", ".github/**", ".prettierignore", "AUTHORS", "LICENSE"]
pull_request:
branches:
- main
paths-ignore:
["*.md", "docs/**", ".github/**", ".prettierignore", "AUTHORS", "LICENSE"]
types: [opened, synchronize, reopened, edited]
workflow_dispatch:
permissions:
contents: read
id-token: write # for Codecov OIDC
jobs:
lint:
uses: ./.github/workflows/npm-script.yml
with:
npm-script: lint
smoke:
uses: ./.github/workflows/npm-script.yml
with:
node-versions: "20,22,24"
npm-script: test-smoke
test-node-lts:
# TODO: Restore "mocha-github-actions-reporter" style reporting without relying on third party module
# https://github.com/mochajs/mocha/issues/5183
uses: ./.github/workflows/npm-script.yml
needs: smoke
strategy:
fail-fast: false
matrix:
test-part:
- interfaces
- unit
- integration
- jsapi
- requires
- reporters
- only
with:
npm-script: test-node:${{ matrix.test-part }}
test-node-all:
name: Test ${{ matrix.test-part }} in all environments
permissions:
id-token: write # for Codecov OIDC
contents: read # for Codecov OIDC
# TODO: Restore "mocha-github-actions-reporter" style reporting without relying on third party module
# https://github.com/mochajs/mocha/issues/5183
uses: ./.github/workflows/npm-script.yml
needs: test-node-lts
strategy:
fail-fast: false
matrix:
coverage: [true]
test-part:
- interfaces
- unit
- integration
- requires
- reporters
- only
include:
- test-part: jsapi
coverage: false
with:
os: "ubuntu-latest,windows-latest"
# We pin exact versions here per https://github.com/mochajs/mocha/issues/5052
# Ref https://nodejs.org/en/about/previous-releases
node-versions: "20.19.4,22.18.0,24.6.0"
npm-script: test-node:${{ matrix.test-part }}
coverage: ${{ matrix.coverage }}
test-browser:
name: Browser tests
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
with:
node-version: "22"
cache: "npm"
- run: npm ci --ignore-scripts
- run: npm run test-browser
env:
NODE_OPTIONS: "--trace-warnings"
tsc:
uses: ./.github/workflows/npm-script.yml
with:
npm-script: tsc