This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add ci * fix clippy warnings * fix ci
- Loading branch information
Showing
4 changed files
with
84 additions
and
10 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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
name: continuous-integration | ||
|
||
env: | ||
NUSHELL_CARGO_PROFILE: ci | ||
NU_LOG_LEVEL: DEBUG | ||
CLIPPY_OPTIONS: "-D warnings" | ||
|
||
jobs: | ||
fmt-clippy: | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
# Pinning to Ubuntu 20.04 because building on newer Ubuntu versions causes linux-gnu | ||
# builds to link against a too-new-for-many-Linux-installs glibc version. Consider | ||
# revisiting this when 20.04 is closer to EOL (April 2025) | ||
platform: [macos-latest, ubuntu-20.04, windows-latest] | ||
feature: [default] | ||
include: | ||
- feature: default | ||
flags: "" | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Rust toolchain and cache | ||
uses: actions-rust-lang/[email protected] | ||
with: | ||
rustflags: "" | ||
|
||
- name: cargo fmt | ||
run: cargo fmt --all -- --check | ||
|
||
- name: Clippy | ||
run: cargo clippy --workspace ${{ matrix.flags }} -- $CLIPPY_OPTIONS | ||
|
||
# In tests we don't have to deny unwrap | ||
- name: Clippy of tests | ||
run: cargo clippy --tests --workspace ${{ matrix.flags }} -- -D warnings | ||
|
||
tests: | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
platform: [macos-latest, ubuntu-20.04, windows-latest] | ||
feature: [default] | ||
include: | ||
- feature: default | ||
flags: "" | ||
flags: | ||
- # default | ||
- --all-features | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Rust toolchain and cache | ||
uses: actions-rust-lang/[email protected] | ||
with: | ||
rustflags: "" | ||
|
||
- name: Tests | ||
run: cargo test ${{ matrix.flags }} |
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
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
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