-
Notifications
You must be signed in to change notification settings - Fork 4
ci #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ci #13
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
fec55c6
ci
LeoPatOZ b40c896
format
LeoPatOZ 3f8555c
Update .github/workflows/ci.yml
LeoPatOZ 294cea3
Update .github/workflows/ci.yml
LeoPatOZ 2f90e06
Update .github/workflows/test.yml
LeoPatOZ 810c633
Update .github/workflows/ci.yml
LeoPatOZ 299e2de
Update .github/workflows/test.yml
LeoPatOZ 9d66281
Update .github/workflows/test.yml
LeoPatOZ 8b59a24
change name
LeoPatOZ File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,87 @@ | ||
| name: check | ||
| # This workflow runs whenever a PR is opened or updated, or a commit is pushed | ||
| # to main. It runs several checks: | ||
| # - fmt: checks that the code is formatted according to `rustfmt`. | ||
| # - clippy: checks that the code does not contain any `clippy` warnings. | ||
| # - doc: checks that the code can be documented without errors. | ||
| # - typos: checks for typos across the repo. | ||
| permissions: | ||
| contents: read | ||
| # This configuration allows maintainers of this repo to create a branch and | ||
| # pull request based on the new branch. Restricting the push trigger to the | ||
| # main branch ensures that the PR only gets built once. | ||
| on: | ||
| push: | ||
| branches: [main, v*] | ||
| pull_request: | ||
| # If new code is pushed to a PR branch, then cancel in progress workflows for | ||
| # that PR. Ensures that we don't waste CI time, and returns results quicker. | ||
| # https://github.com/jonhoo/rust-ci-conf/pull/5 | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: true | ||
| env: | ||
| CARGO_TERM_COLOR: always | ||
|
|
||
| jobs: | ||
| cargo-build: | ||
| name: Cargo Build | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Fetch Repository | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Install stable toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
|
|
||
| - name: cargo build | ||
| run: cargo b --locked --all-targets --all-features | ||
|
|
||
| cargo-fmt: | ||
| name: Cargo fmt | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Fetch Repository | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Install stable toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| with: | ||
| components: rustfmt | ||
| toolchain: nightly | ||
|
|
||
| - name: Rustfmt Check | ||
| run: cargo fmt --all --check | ||
|
|
||
| cargo-clippy: | ||
| name: Cargo clippy | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Fetch Repository | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Install stable toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| with: | ||
| components: clippy | ||
|
|
||
| - name: Clippy Check | ||
| uses: giraffate/clippy-action@v1 | ||
| with: | ||
| reporter: "github-pr-check" | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| clippy_flags: --all-targets --all-features -- -D warnings -D clippy::pedantic | ||
|
|
||
| typos-cli: | ||
| name: typos | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Fetch Repository | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Check spelling of files in the workspace | ||
| uses: crate-ci/typos@v1 |
This file contains hidden or 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,46 @@ | ||
| name: tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| merge_group: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| cargo-next-test: | ||
| name: Cargo test | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Fetch Repository | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Install stable toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
|
|
||
| - name: Cache cargo-nextest binary | ||
| id: cache-cargo-nextest | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cargo/bin/cargo-nextest | ||
| key: ${{ runner.os }}-cargo-nextest-${{ hashFiles('**/Cargo.lock') }} | ||
|
|
||
| - name: Install cargo-nextest | ||
| if: steps.cache-cargo-nextest.outputs.cache-hit != 'true' | ||
| uses: taiki-e/install-action@v2 | ||
| with: | ||
| tool: cargo-nextest | ||
|
|
||
| - name: Cargo test | ||
| run: cargo nextest run --locked --all-targets --all-features --no-tests=pass | ||
|
|
||
| # https://github.com/rust-lang/cargo/issues/6669 | ||
| - name: Run doc tests | ||
| run: cargo test --locked --doc |
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use the
rust-analyzerextension, my IDE is configured to auto-format when saving the fileThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have that as well but for some reason i can't get it to format using the rules in the rustfmt.toml file because it requires the nightly version of rustfmt, so my ide only formats based on naive fmt rules instead of the project ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird