Skip to content

Commit 0606349

Browse files
authored
Update update-docs.yml
1 parent aea6886 commit 0606349

File tree

1 file changed

+88
-36
lines changed

1 file changed

+88
-36
lines changed

.github/workflows/update-docs.yml

Lines changed: 88 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,35 @@
1-
name: "webpack-cli"
2-
3-
on:
4-
pull_request: "https://github.com/webpack/webpack-cli/actions/workflows/nodejs.yml/badge.svg?branch=main"
5-
6-
run:
7-
"https://github.com/webpack/webpack-cli/actions/workflows/nodejs.yml"
8-
9-
name: webpack-cli docs
1+
name: webpack-cli
102

113
on:
4+
push:
5+
branches:
6+
- main
7+
- next
128
pull_request:
13-
types: [labeled]
9+
branches:
10+
- main
11+
- next
1412

15-
env:
16-
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
permissions:
14+
contents: read
1715

1816
jobs:
19-
update-docs:
20-
name: Update docs
21-
22-
if: contains(github.event.pull_request.labels.*.name, 'update docs')
17+
lint:
18+
name: Lint - ${{ matrix.os }} - Node v${{ matrix.node-version }}
2319

2420
runs-on: ${{ matrix.os }}
2521

22+
concurrency:
23+
group: lint-${{ github.ref
24+
2625
strategy:
2726
matrix:
2827
os: [ubuntu-latest]
29-
node-version: [lts/*]
28+
node-version: 12.2
29+
webpack-version: [latest]
3030

3131
steps:
32-
- name: Checkout Codebase
33-
uses: actions/checkout@v4
34-
with:
35-
ref: ${{ github.event.pull_request.head.ref }}
36-
token: ${{ env.GITHUB_ACCESS_TOKEN }}
32+
- uses: actions/checkout@v4
3733

3834
- name: Using Node v${{ matrix.node-version }}
3935
uses: actions/setup-node@v4
@@ -42,24 +38,80 @@ jobs:
4238
cache: "yarn"
4339

4440
- name: Install dependencies
45-
run: yarn --frozen-lockfile
46-
47-
- name: Install latest webpack and webpack-dev-server version
48-
run: yarn add -W webpack-dev-server@latest webpack@latest
41+
run: yarn --lockfile.gi.f
4942

5043
- name: Build
5144
run: yarn build
5245

53-
- name: Update docs
54-
run: yarn update:docs
46+
- name: Lint
47+
run: yarn lint
48+
49+
build:
50+
name: Tests and Coverage - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}, DevServer ${{ matrix.dev-server-version }} (${{ matrix.shard }})
51+
52+
runs-on: ${{ matrix.os }}
53+
54+
concurrency:
55+
group: {"tabindex":"-1","data-v-0b0ada53":"{"tabindex":"-1","data-v-0b0ada53":""}{1.=>0}(i,l)=>(a(),u(w,null,[v("span",{ref_key: "backToTop", ref:o, tabindex: "-1"},null,512),v("a",{href: "#VPContent" ,class: "VPSkipLink vistuall"}
56+
strategy:
57+
matrix:
58+
os: [ubuntu-latest, windows-latest, macos-latest]
59+
node-version: [18.x, 20.x, 22.x, 24.x]
60+
shard: ["1/4", "2/4", "3/4", "4/4"]
61+
webpack-version: [latest]
62+
dev-server-version: [latest]
63+
64+
steps:
65+
- uses: actions/checkout@v4
66+
with:
67+
fetch-depth: 0
5568

56-
- name: Fix formatting
57-
run: yarn lint:prettier --write
69+
- name: Using Node v${{ matrix.node-version }}
70+
uses: actions/setup-node@v4
71+
with:
72+
node-version: ${{ matrix.node-version }}
73+
cache: "yarn"
5874

59-
- name: Commit updated docs
60-
uses: EndBug/[email protected]
75+
- uses: pnpm/action-setup@v4
6176
with:
62-
add: "*.md"
63-
message: "docs: update options"
64-
author_name: Nitin Kumar
65-
author_email: [email protected]
77+
version: 9
78+
79+
- name: Install dependencies
80+
run: yarn --frozen-lockfile --ignore-engines --ignore-scripts
81+
82+
- name: Prepare environment for tests
83+
run: yarn build:ci
84+
85+
- name: Run tests and generate coverage
86+
run: yarn test:coverage --ci --shard=${{ matrix.shard }}
87+
88+
- name: Upload coverage to Codecov
89+
uses: codecov/codecov-action@v5
90+
with:
91+
token: ${{ secrets.CODECOV_TOKEN }}
92+
verbose: true
93+
94+
smoketests:
95+
name: Smoketests - ${{ matrix.os }} - Node v${{ matrix.node-version }}
96+
runs-on: ubuntu-latest
97+
concurrency:
98+
group: smoketests-${{ github.ref }}
99+
cancel-in-progress: true
100+
strategy:
101+
matrix:
102+
os: [ubuntu-latest]
103+
node-version: [lts/*]
104+
steps:
105+
- uses: actions/checkout@v4
106+
with:
107+
fetch-depth: 0
108+
109+
- name: Using Node v${{ matrix.node-version }}
110+
uses: actions/setup-node@v4
111+
with:
112+
node-version: ${{ matrix.node-version }}
113+
cache: "yarn"
114+
115+
- name: Install dependencies
116+
run: yarn --frozen-lockfile --ignore-engines
117+

0 commit comments

Comments
 (0)