GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ci: reuse just lint and just test as the single source of truth (#1809) · voidzero-dev/vite-plus@e48ae1e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • ci.yml
  • Cargo.toml
  • justfile
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/ci.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+6-20Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,14 @@ jobs:
9999
with:
100100
save-cache: ${{ github.ref_name == 'main' }}
101101
cache-key: test
102+
tools: just
102103
target-dir: ${{ runner.os == 'Windows' && format('{0}/target', env.DEV_DRIVE) || '' }}
103104

104105
- run: cargo check --all-targets --all-features
105106
env:
106107
RUSTFLAGS: '-D warnings --cfg tokio_unstable' # also update .cargo/config.toml
107108

108-
# Test all crates/* packages. New crates are automatically included.
109-
# Also test vite-plus-cli (lives outside crates/) to catch type sync issues.
110-
- run: cargo test $(for d in crates/*/; do echo -n "-p $(basename $d) "; done) -p vite-plus-cli
111-
env:
112-
RUST_MIN_STACK: 8388608
109+
- run: just test
113110

114111
test-musl:
115112
needs: detect-changes
@@ -133,7 +130,7 @@ jobs:
133130
steps:
134131
- name: Install Alpine dependencies
135132
shell: sh {0}
136-
run: apk add --no-cache bash curl git musl-dev gcc g++ python3 cmake make
133+
run: apk add --no-cache bash curl git just musl-dev gcc g++ python3 cmake make
137134

138135
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
139136
- uses: ./.github/actions/clone
@@ -148,12 +145,8 @@ jobs:
148145
- name: Install Rust toolchain
149146
run: rustup show
150147

151-
# Test all crates/* packages. New crates are automatically included.
152-
# Also test vite-plus-cli (lives outside crates/) to catch type sync issues.
153148
# Skip separate cargo check — cargo test already compiles everything.
154-
- run: cargo test $(for d in crates/*/; do echo -n "-p $(basename $d) "; done) -p vite-plus-cli
155-
env:
156-
RUST_MIN_STACK: 8388608
149+
- run: just test
157150

158151
lint:
159152
needs: detect-changes
@@ -168,20 +161,13 @@ jobs:
168161
with:
169162
save-cache: ${{ github.ref_name == 'main' }}
170163
cache-key: lint
171-
tools: cargo-shear
164+
tools: just,cargo-shear
172165
components: clippy rust-docs rustfmt
173166

174167
- run: |
175168
cargo shear
176169
cargo fmt --check
177-
# Allow new clippy lints from the toolchain that fire in upstream
178-
# rolldown crates without a `[lints]` table.
179-
cargo clippy --all-targets --all-features -- -D warnings \
180-
-A clippy::byte_char_slices \
181-
-A clippy::manual_assert_eq \
182-
-A clippy::needless_return_with_question_mark \
183-
-A clippy::unused_async_trait_impl \
184-
-A clippy::useless_borrows_in_formatting
170+
just lint
185171
# RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --document-private-items
186172

187173
- uses: crate-ci/typos@37bb98842b0d8c4ffebdb75301a13db0267cef89 # v1.47.2
Collapse file

‎Cargo.toml‎

Copy file name to clipboardExpand all lines: Cargo.toml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ unnecessary_struct_initialization = "allow"
143143
unnecessary_wraps = "allow"
144144
unnested_or_patterns = "allow"
145145
unused_async = "allow"
146+
unused_async_trait_impl = "allow"
146147
unused_self = "allow"
147148
use_self = "allow"
148149
used_underscore_binding = "allow"
Collapse file

‎justfile‎

Copy file name to clipboardExpand all lines: justfile
+12-2Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,26 @@ check:
6767
watch-check:
6868
just watch "'cargo check; cargo clippy'"
6969

70+
# Test all crates/* packages (new crates are automatically included) plus
71+
# vite-plus-cli (lives outside crates/) to catch type sync issues.
72+
# Single source of truth for cargo test, used by CI too.
7073
[unix]
7174
test:
7275
RUST_MIN_STACK=8388608 cargo test $(for d in crates/*/; do echo -n "-p $(basename $d) "; done) -p vite-plus-cli
7376

7477
[windows]
7578
test:
76-
$packages = Get-ChildItem -Path crates -Directory | ForEach-Object { '-p'; $_.Name }; $Env:__COMPAT_LAYER='RunAsInvoker'; cargo test @packages -p vite-plus-cli
79+
$packages = Get-ChildItem -Path crates -Directory | ForEach-Object { '-p'; $_.Name }; $Env:RUST_MIN_STACK='8388608'; $Env:__COMPAT_LAYER='RunAsInvoker'; cargo test @packages -p vite-plus-cli
7780

81+
# Single source of truth for clippy, used by CI too. The `-A` flags allow
82+
# new toolchain lints that fire in upstream rolldown crates without a `[lints]` table.
7883
lint:
79-
cargo clippy --workspace --all-targets --all-features -- --deny warnings
84+
cargo clippy --workspace --all-targets --all-features -- --deny warnings \
85+
-A clippy::byte_char_slices \
86+
-A clippy::manual_assert_eq \
87+
-A clippy::needless_return_with_question_mark \
88+
-A clippy::unused_async_trait_impl \
89+
-A clippy::useless_borrows_in_formatting
8090

8191
[unix]
8292
doc:

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.