Skip to content

Commit 7ae6f61

Browse files
committed
Revert "for now, remove all other builds and run on PRs"
This reverts commit 2264997.
1 parent 11aad72 commit 7ae6f61

File tree

6 files changed

+367
-3
lines changed

6 files changed

+367
-3
lines changed

.github/workflows/close-stale.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: 'Close stale issues and PRs'
2+
on:
3+
schedule:
4+
- cron: '0 * * * *'
5+
6+
permissions:
7+
issues: write # to close stale issues (actions/stale)
8+
pull-requests: write # to close stale PRs (actions/stale)
9+
10+
jobs:
11+
stale:
12+
name: 'Close month old issues and PRs'
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/stale@v8
16+
with:
17+
start-date: '2022-01-01T00:00:00Z'
18+
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.'
19+
stale-pr-message: 'This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.'
20+
close-issue-message: 'This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.'
21+
close-pr-message: 'This PR was closed because it has been stalled for 30 days with no activity. Please open a new PR if the issue is still relevant, linking to this one.'
22+
days-before-issue-stale: 30
23+
days-before-pr-stale: 90
24+
days-before-issue-close: 30
25+
days-before-pr-close: 30
26+
exempt-all-milestones: true
27+
exempt-issue-labels: Pinned
28+
exempt-pr-labels: Pinned
29+
exempt-draft-pr: true
30+
operations-per-run: 1750
31+
stale-legacy:
32+
name: 'Close year old issues and PRs'
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/stale@v8
36+
with:
37+
stale-issue-message: 'This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.'
38+
stale-pr-message: 'This PR is stale because it has been open 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.'
39+
close-issue-message: 'This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.'
40+
close-pr-message: 'This PR was closed because it has been stalled for 30 days with no activity. Please open a new PR if the issue is still relevant, linking to this one.'
41+
days-before-issue-stale: 365
42+
days-before-pr-stale: 365
43+
days-before-issue-close: 30
44+
days-before-pr-close: 30
45+
exempt-all-milestones: true
46+
exempt-issue-labels: Pinned
47+
exempt-pr-labels: Pinned
48+
operations-per-run: 1750

.github/workflows/issues.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: 'Close issues'
2+
3+
on:
4+
issues:
5+
types: [labeled]
6+
7+
permissions:
8+
issues: write # to close issues (peter-evans/close-issue)
9+
10+
jobs:
11+
questions:
12+
name: Questions
13+
runs-on: ubuntu-latest
14+
steps:
15+
- if: "${{ github.event.label.name == ':speech_balloon: Question' }}"
16+
run: gh issue close $ISSUE --comment "Please note this issue tracker is not a help forum. We recommend using [StackOverflow](https://stackoverflow.com/questions/tagged/jestjs) or our [discord channel](https://discord.gg/j6FKKQQrW9) for questions."
17+
env:
18+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
ISSUE: ${{ github.event.issue.html_url }}
20+
bug-without-repro:
21+
name: Bug reports without reproductions
22+
runs-on: ubuntu-latest
23+
steps:
24+
- if: "${{ github.event.label.name == 'Needs Reproduction' }}"
25+
run: gh issue close $ISSUE --comment "As noted in the [Bug Report template](https://github.com/jestjs/jest/blob/main/.github/ISSUE_TEMPLATE/bug.yml), all bug reports requires a minimal reproduction. Please open up a new issue providing one. Read more at https://stackoverflow.com/help/minimal-reproducible-example."
26+
env:
27+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
ISSUE: ${{ github.event.issue.html_url }}

.github/workflows/lock.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: 'Lock Threads'
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
7+
permissions: {}
8+
jobs:
9+
lock:
10+
permissions:
11+
issues: write # to lock issues (dessant/lock-threads)
12+
pull-requests: write # to lock PRs (dessant/lock-threads)
13+
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: dessant/lock-threads@v4
17+
with:
18+
github-token: ${{ github.token }}
19+
issue-inactive-days: '30'
20+
exclude-any-issue-labels: 'Discussion'
21+
issue-comment: >
22+
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
23+
24+
Please note this issue tracker is not a help forum. We recommend using [StackOverflow](https://stackoverflow.com/questions/tagged/jestjs) or our [discord channel](https://discord.gg/j6FKKQQrW9) for questions.
25+
26+
27+
pr-inactive-days: '30'
28+
pr-comment: >
29+
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
30+
31+
Please note this issue tracker is not a help forum. We recommend using [StackOverflow](https://stackoverflow.com/questions/tagged/jestjs) or our [discord channel](https://discord.gg/j6FKKQQrW9) for questions.
32+

.github/workflows/nightly.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
workflow_dispatch:
55
schedule:
66
- cron: '0 12 * * *'
7-
pull_request:
8-
branches:
9-
- '**'
107

118
concurrency:
129
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}

.github/workflows/nodejs.yml

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
name: Node CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- '**'
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
15+
permissions:
16+
contents: read # to fetch code (actions/checkout)
17+
18+
jobs:
19+
prepare-yarn-cache-ubuntu:
20+
uses: ./.github/workflows/prepare-cache.yml
21+
with:
22+
os: ubuntu-latest
23+
prepare-yarn-cache-macos:
24+
uses: ./.github/workflows/prepare-cache.yml
25+
with:
26+
os: macos-latest
27+
prepare-yarn-cache-windows:
28+
uses: ./.github/workflows/prepare-cache.yml
29+
with:
30+
os: windows-latest
31+
32+
ts-compatibility:
33+
name: TypeScript Compatibility
34+
runs-on: ubuntu-latest
35+
needs: prepare-yarn-cache-ubuntu
36+
37+
steps:
38+
- uses: actions/checkout@v4
39+
with:
40+
persist-credentials: false
41+
- uses: actions/setup-node@v3
42+
with:
43+
node-version: lts/*
44+
cache: yarn
45+
- name: install
46+
run: yarn --immutable
47+
- name: build
48+
run: yarn build
49+
- name: ts integration
50+
run: yarn test-ts --selectProjects ts-integration
51+
- name: type tests
52+
run: yarn test-ts --selectProjects type-tests
53+
- name: verify [email protected] compatibility
54+
run: yarn verify-old-ts
55+
- name: run ESLint with type info
56+
run: yarn lint-ts-files
57+
58+
typecheck:
59+
name: Typecheck Examples and Tests
60+
runs-on: ubuntu-latest
61+
needs: prepare-yarn-cache-ubuntu
62+
63+
steps:
64+
- uses: actions/checkout@v4
65+
with:
66+
persist-credentials: false
67+
- uses: actions/setup-node@v3
68+
with:
69+
node-version: lts/*
70+
cache: yarn
71+
- name: install
72+
run: yarn --immutable
73+
- name: build
74+
run: yarn build:ts
75+
- name: typecheck examples
76+
run: yarn typecheck:examples
77+
- name: typecheck tests
78+
run: yarn typecheck:tests
79+
80+
lint:
81+
name: Lint
82+
runs-on: ubuntu-latest
83+
needs: prepare-yarn-cache-ubuntu
84+
85+
steps:
86+
- uses: actions/checkout@v4
87+
with:
88+
persist-credentials: false
89+
- uses: actions/setup-node@v3
90+
with:
91+
node-version: lts/*
92+
cache: yarn
93+
- name: install
94+
run: yarn --immutable
95+
- name: build
96+
run: yarn build:js
97+
- name: verify Yarn PnP compatibility
98+
run: yarn verify-pnp
99+
- name: run eslint
100+
run: yarn lint
101+
- name: run prettier
102+
run: yarn lint:prettier:ci
103+
- name: check changelog
104+
run: yarn check-changelog
105+
- name: check copyright headers
106+
run: yarn check-copyright-headers
107+
108+
yarn-validate:
109+
name: Validate Yarn dependencies and constraints
110+
runs-on: ubuntu-latest
111+
needs: prepare-yarn-cache-ubuntu
112+
steps:
113+
- uses: actions/checkout@v4
114+
with:
115+
persist-credentials: false
116+
- uses: actions/setup-node@v3
117+
with:
118+
node-version: lts/*
119+
cache: yarn
120+
- name: 'Check for unmet constraints (fix w/ "yarn constraints --fix")'
121+
run: yarn constraints
122+
- name: 'Check for duplicate dependencies (fix w/ "yarn dedupe")'
123+
run: yarn dedupe --check
124+
125+
test-ubuntu:
126+
uses: ./.github/workflows/test.yml
127+
needs: prepare-yarn-cache-ubuntu
128+
with:
129+
os: ubuntu-latest
130+
test-macos:
131+
uses: ./.github/workflows/test.yml
132+
needs: prepare-yarn-cache-macos
133+
with:
134+
os: macos-latest
135+
test-windows:
136+
uses: ./.github/workflows/test.yml
137+
needs: prepare-yarn-cache-windows
138+
with:
139+
os: windows-latest
140+
141+
test-leak:
142+
name: Node LTS on Ubuntu with leak detection
143+
runs-on: ubuntu-latest
144+
needs: prepare-yarn-cache-ubuntu
145+
146+
steps:
147+
- uses: actions/checkout@v4
148+
with:
149+
persist-credentials: false
150+
- name: Use Node.js LTS
151+
uses: actions/setup-node@v3
152+
with:
153+
node-version: lts/*
154+
cache: yarn
155+
- name: install
156+
run: yarn --immutable
157+
- name: build
158+
run: yarn build:js
159+
- name: run tests with leak detection
160+
run: yarn test-leak
161+
162+
test-coverage:
163+
name: Node LTS on Ubuntu with coverage (${{ matrix.shard }})
164+
strategy:
165+
fail-fast: false
166+
matrix:
167+
shard: ['1/4', '2/4', '3/4', '4/4']
168+
runs-on: ubuntu-latest
169+
needs: prepare-yarn-cache-ubuntu
170+
171+
steps:
172+
- uses: actions/checkout@v4
173+
with:
174+
persist-credentials: false
175+
- name: Use Node.js LTS
176+
uses: actions/setup-node@v3
177+
with:
178+
node-version: lts/*
179+
cache: yarn
180+
- name: install
181+
run: yarn --immutable
182+
- name: build
183+
run: yarn build:js
184+
- name: Get number of CPU cores
185+
id: cpu-cores
186+
uses: SimenB/github-actions-cpu-cores@v2
187+
- name: run tests with coverage
188+
run: yarn jest-coverage --color --config jest.config.ci.mjs --max-workers ${{ steps.cpu-cores.outputs.count }} --shard=${{ matrix.shard }}
189+
- name: map coverage
190+
run: node ./scripts/mapCoverage.mjs
191+
if: always()
192+
- uses: codecov/codecov-action@v3
193+
if: always()
194+
with:
195+
directory: ./coverage

.github/workflows/test.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Test
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
os:
7+
required: true
8+
type: string
9+
10+
jobs:
11+
test:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
node-version: [14.x, 16.x, 18.x, 19.x, 20.x]
16+
shard: ['1/4', '2/4', '3/4', '4/4']
17+
name: Node v${{ matrix.node-version }} on ${{ inputs.os }} (${{ matrix.shard }})
18+
runs-on: ${{ inputs.os }}
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
persist-credentials: false
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: yarn
29+
- name: install
30+
run: yarn --immutable
31+
- name: build
32+
run: yarn build:js
33+
- name: Get number of CPU cores
34+
id: cpu-cores
35+
uses: SimenB/github-actions-cpu-cores@v2
36+
- name: run tests
37+
run: yarn test-ci-partial:parallel --max-workers ${{ steps.cpu-cores.outputs.count }} --shard=${{ matrix.shard }}
38+
39+
test-jasmine:
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
shard: ['1/4', '2/4', '3/4', '4/4']
44+
name: Node LTS on ${{ inputs.os }} using jest-jasmine2 (${{ matrix.shard }})
45+
runs-on: ${{ inputs.os }}
46+
47+
steps:
48+
- uses: actions/checkout@v4
49+
with:
50+
persist-credentials: false
51+
- name: Use Node.js LTS
52+
uses: actions/setup-node@v3
53+
with:
54+
node-version: lts/*
55+
cache: yarn
56+
- name: install
57+
run: yarn --immutable
58+
- name: build
59+
run: yarn build:js
60+
- name: Get number of CPU cores
61+
id: cpu-cores
62+
uses: SimenB/github-actions-cpu-cores@v2
63+
- name: run tests using jest-jasmine
64+
run: yarn jest-jasmine-ci --max-workers ${{ steps.cpu-cores.outputs.count }} --shard=${{ matrix.shard }}

0 commit comments

Comments
 (0)