-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1884 from fermyon/more-linting
Run lints on Rust test cases
- Loading branch information
Showing
11 changed files
with
243 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,19 +35,18 @@ jobs: | |
rust-wasm: true | ||
rust-cache: true | ||
|
||
- name: Cargo Format | ||
- name: Run lints | ||
run: | ||
BUILD_SPIN_EXAMPLES=0 cargo fmt --all -- --check | ||
BUILD_SPIN_EXAMPLES=0 make lint | ||
|
||
- name: Cargo Clippy | ||
run: | ||
BUILD_SPIN_EXAMPLES=0 cargo clippy --workspace --all-targets --features all-tests -- -D warnings | ||
- name: Cancel everything if linting fails | ||
if: failure() | ||
uses: andymckay/[email protected] | ||
|
||
## This is separated out to remove e2e-tests dependency on windows/mac builds | ||
build-rust-ubuntu: | ||
name: Build Spin Ubuntu | ||
runs-on: ubuntu-latest | ||
needs: [lint-rust] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
|
@@ -72,7 +71,6 @@ jobs: | |
build-rust: | ||
name: Build Spin | ||
runs-on: ${{ matrix.os }} | ||
needs: [lint-rust] | ||
strategy: | ||
matrix: | ||
os: [windows-latest, macos-latest] | ||
|
@@ -101,7 +99,6 @@ jobs: | |
test-rust: | ||
name: Test Spin SDK - Rust | ||
runs-on: ${{ matrix.runner }} | ||
needs: [lint-rust] | ||
strategy: | ||
matrix: | ||
runner: [ubuntu-22.04-4core-spin, macos-latest] | ||
|
@@ -176,19 +173,3 @@ jobs: | |
chmod +x `pwd`/target/release/spin | ||
export E2E_VOLUME_MOUNT="-v `pwd`/target/release/spin:/usr/local/bin/spin" | ||
make run-test-spin-up | ||
lint-examples: | ||
name: Lint Examples | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up dependencies | ||
uses: ./.github/actions/spin-ci-dependencies | ||
with: | ||
rust: true | ||
rust-wasm: true | ||
rust-cache: true | ||
|
||
- name: Lint examples | ||
run: make check-rust-examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.