Skip to content

Commit 6424123

Browse files
committed
pls work
1 parent 0c6f172 commit 6424123

File tree

3 files changed

+27
-24
lines changed

3 files changed

+27
-24
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
name: CI
22
on:
33
push:
4-
branches: [ master ]
4+
branches: [master]
55
pull_request:
66
permissions:
77
contents: read # to fetch code (actions/checkout)
88

9-
env:
10-
# We only install Chromium manually
11-
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
12-
139
jobs:
1410
Tests:
1511
runs-on: ${{ matrix.os }}
@@ -28,14 +24,9 @@ jobs:
2824
- node-version: 20
2925
os: ubuntu-latest
3026
steps:
31-
- uses: actions/checkout@v3
32-
- uses: pnpm/[email protected]
33-
- uses: actions/setup-node@v3
27+
- uses: ./.github/workflows/setup.yml
3428
with:
3529
node-version: ${{ matrix.node-version }}
36-
cache: pnpm
37-
- run: pnpm install --frozen-lockfile
38-
- run: pnpm playwright install chromium
3930
- run: pnpm test
4031
env:
4132
CI: true

.github/workflows/release.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,7 @@ jobs:
1616
name: Release
1717
runs-on: ubuntu-latest
1818
steps:
19-
- name: Checkout Repo
20-
uses: actions/checkout@v3
21-
with:
22-
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
23-
fetch-depth: 0
24-
- uses: pnpm/[email protected]
25-
- name: Setup Node.js
26-
uses: actions/setup-node@v3
27-
with:
28-
node-version: 18.x
29-
cache: pnpm
30-
31-
- run: pnpm install --frozen-lockfile
19+
- uses: ./.github/workflows/setup.yml
3220

3321
- name: Create Release Pull Request or Publish to npm
3422
id: changesets

.github/workflows/setup.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
workflow-call:
3+
inputs:
4+
node-version:
5+
description: 'Node.js version'
6+
required: false
7+
default: 18
8+
9+
permissions:
10+
contents: read # to fetch code (actions/checkout)
11+
12+
env:
13+
# We only install Chromium manually
14+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
15+
16+
jobs:
17+
- uses: actions/checkout@v3
18+
- uses: pnpm/[email protected]
19+
- uses: actions/setup-node@v3
20+
with:
21+
node-version: ${{ github.event.inputs.node-version }}
22+
cache: pnpm
23+
- run: pnpm install --frozen-lockfile
24+
- run: pnpm playwright install chromium

0 commit comments

Comments
 (0)