xfy 94319d3411
Some checks failed
CI / check (push) Failing after 18m26s
CI / build (push) Has been skipped
ci: 回退 composite action,仅保留 Tailwind CLI 包名修复
Gitea act_runner 对本地 composite action(uses: ./...)支持不稳定,
报 'failed to read action.yml ... file does not exist'。回退为内联
步骤,仅保留 @tailwindcss/cli 包名修正(v4 将 CLI 拆为独立包)。
2026-06-15 13:22:29 +08:00

108 lines
3.2 KiB
YAML

name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
env:
RUSTUP_UPDATE_ROOT: https://mirrors.tuna.tsinghua.edu.cn/rustup/rustup
RUSTUP_DIST_SERVER: https://mirrors.tuna.tsinghua.edu.cn/rustup
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
run: |
git init
git remote add origin https://git.rua.plus/${{ github.repository }}.git
git fetch --depth 1 origin ${{ github.sha }}
git checkout ${{ github.sha }}
- name: Configure Cargo mirror
run: |
mkdir -p "$HOME/.cargo"
printf '%s\n' '[source.crates-io]' "replace-with = 'rsproxy'" '' "[source.rsproxy]" 'registry = "sparse+https://rsproxy.cn/index/"' > "$HOME/.cargo/config.toml"
- name: Install Rust toolchain
run: |
for i in 1 2 3; do
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable && break
echo "rustup install attempt $i failed, retrying..."
sleep 15
done
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install Node.js
run: |
apt-get update
apt-get install -y nodejs npm
- name: Install Rust target
run: rustup target add wasm32-unknown-unknown
- name: Install Dioxus CLI
run: cargo install dioxus-cli --locked
- name: Install Tailwind CSS CLI
run: npm install -g @tailwindcss/cli
- name: Check formatting
run: cargo fmt -- --check
- name: Run Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run tests
run: cargo test --all-features
- name: Dioxus check
run: dx check
build:
runs-on: ubuntu-latest
needs: check
env:
RUSTUP_UPDATE_ROOT: https://mirrors.tuna.tsinghua.edu.cn/rustup/rustup
RUSTUP_DIST_SERVER: https://mirrors.tuna.tsinghua.edu.cn/rustup
steps:
- name: Checkout
run: |
git init
git remote add origin https://git.rua.plus/${{ github.repository }}.git
git fetch --depth 1 origin ${{ github.sha }}
git checkout ${{ github.sha }}
- name: Configure Cargo mirror
run: |
mkdir -p "$HOME/.cargo"
printf '%s\n' '[source.crates-io]' "replace-with = 'rsproxy'" '' "[source.rsproxy]" 'registry = "sparse+https://rsproxy.cn/index/"' > "$HOME/.cargo/config.toml"
- name: Install Rust toolchain
run: |
for i in 1 2 3; do
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable && break
echo "rustup install attempt $i failed, retrying..."
sleep 15
done
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install Node.js
run: |
apt-get update
apt-get install -y nodejs npm
- name: Install Rust target
run: rustup target add wasm32-unknown-unknown
- name: Install Dioxus CLI
run: cargo install dioxus-cli --locked
- name: Install Tailwind CSS CLI
run: npm install -g @tailwindcss/cli
- name: Build release
run: make build