-
Notifications
You must be signed in to change notification settings - Fork 128
87 lines (72 loc) · 2.77 KB
/
Copy pathpack-integration.yml
File metadata and controls
87 lines (72 loc) · 2.77 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
name: utoopack-integration
on:
push:
branches: ["next"]
pull_request:
types: [opened, synchronize, reopened, edited]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
integration:
if: (github.event_name == 'push' && contains(github.event.head_commit.message, '(pack)')) || (github.event_name == 'pull_request' && contains(github.event.pull_request.title, '(pack)'))
name: Pack Integration Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Init git submodules
run: git submodule update --init --recursive --depth 1
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf /usr/share/swift
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/share/miniconda
sudo docker image prune --all --force
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22.14.0
- name: Setup Utoo
uses: utooland/setup-utoo@v1
- name: Install dependencies
run: utoo install
- name: Setup Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2026-07-29
components: rustfmt, clippy
# - name: Rust Cache
# uses: swatinem/rust-cache@v2
- name: Integration Test
run: |
# Build packages
npm run build --workspace @utoo/pack-shared
npm run build:local --workspace @utoo/pack
npm run build --workspace @utoo/pack-cli
# Regression coverage for independent PostCSS and loader evaluator graphs sharing one
# build-time runtime (utooland/utoo#3316).
npm test --workspace shared-runtime-async-module
# Verify examples
for dir in examples/*/; do
if [ -f "${dir}package.json" ]; then
if jq -e '.scripts.build // "" | contains("up build")' "${dir}package.json" > /dev/null; then
echo "----------------------------------------------------"
echo "Verifying example: $dir"
echo "----------------------------------------------------"
(cd "$dir" && npm run build && echo "Output dist content:" && ls -lh dist | awk 'NR>1 {print $5, $9}')
if [ $? -ne 0 ]; then
echo "Error: Build failed for example $dir"
exit 1
fi
fi
fi
done