Skip to content

Commit a562190

Browse files
authored
Consolidate CI workflows (#788)
1 parent 96ea03f commit a562190

File tree

6 files changed

+95
-103
lines changed

6 files changed

+95
-103
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
name: Build
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: CI Setup
21+
uses: ./.github/actions/ci-setup
22+
23+
- name: Build packages
24+
run: pnpm --filter "@radix-ui/*" build
25+
26+
- name: Upload build artifacts
27+
uses: actions/upload-artifact@v6
28+
with:
29+
name: build-output
30+
path: |
31+
packages/*/dist
32+
packages/radix-ui-themes/layout
33+
packages/radix-ui-themes/tokens
34+
packages/radix-ui-themes/*.css
35+
retention-days: 1
36+
37+
lint:
38+
name: Lint
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v4
43+
44+
- name: CI Setup
45+
uses: ./.github/actions/ci-setup
46+
47+
- name: Lint
48+
run: pnpm --filter "@radix-ui/*" lint
49+
50+
format:
51+
name: Check Formatting
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v4
56+
57+
- name: CI Setup
58+
uses: ./.github/actions/ci-setup
59+
60+
- name: Check formatting
61+
run: pnpm format:check
62+
63+
test-vr:
64+
name: 'Tests: Visual regression'
65+
needs: build
66+
runs-on: macos-latest
67+
steps:
68+
- name: Checkout
69+
uses: actions/checkout@v4
70+
71+
- name: CI Setup
72+
uses: ./.github/actions/ci-setup
73+
74+
- name: Download build artifacts
75+
uses: actions/download-artifact@v7
76+
with:
77+
name: build-output
78+
path: packages
79+
80+
- name: Install Playwright Browsers
81+
run: pnpm --filter "playground" exec playwright install --with-deps
82+
83+
- name: Run Visual Regression Tests
84+
run: pnpm test:vr
85+
86+
- name: Upload test results
87+
if: failure()
88+
uses: actions/upload-artifact@v6
89+
with:
90+
name: playwright-report
91+
path: apps/playground/test-results/
92+
retention-days: 30

.github/workflows/format.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/test-vr.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ packages/radix-ui-themes/components.css
1111
packages/radix-ui-themes/utilities.css
1212
packages/radix-ui-themes/tokens.css
1313
packages/radix-ui-themes/layout.css
14+
apps/playground/playwright-report

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"test:vr": "pnpm -r test:vr",
1010
"lint": "turbo run lint",
1111
"clean": "turbo run clean && rm -rf node_modules .turbo",
12-
"format": "prettier --write ."
12+
"format": "prettier --write .",
13+
"format:check": "prettier --check ."
1314
},
1415
"devDependencies": {
1516
"@types/node": "^24",

0 commit comments

Comments
 (0)