-
Notifications
You must be signed in to change notification settings - Fork 0
chore: scaffold initial rust workspace #1
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
| RUST_BACKTRACE: 1 | ||
|
|
||
| jobs: | ||
| format: | ||
| name: Format | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@1.97.0 | ||
| with: | ||
| components: rustfmt | ||
| - name: Check formatting | ||
| run: cargo fmt --all -- --check | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit. I'd run format and lint on the same one |
||
|
|
||
| lint: | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| name: Lint | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@1.97.0 | ||
| with: | ||
| components: clippy | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - name: Run Clippy | ||
| run: cargo clippy --locked --all-targets --all-features -- | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This CI step currently exits non-zero because the API crate denies the full Useful? React with 👍 / 👎. |
||
|
|
||
| build: | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| name: Build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@1.97.0 | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - name: Build debug | ||
| run: cargo build --locked --verbose | ||
| - name: Build release | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure building debug and release is adding much, I'd just build release, the debug version is implicitly built for tests |
||
| run: cargo build --locked --release --verbose | ||
|
|
||
| test: | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| name: Test | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@1.97.0 | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - name: Run tests | ||
| run: cargo test --locked --all --verbose | ||
|
|
||
| deny: | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| name: Cargo deny | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| checks: | ||
| - advisories | ||
| - bans licenses sources | ||
| continue-on-error: ${{ matrix.checks == 'advisories' }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: EmbarkStudios/cargo-deny-action@v2 | ||
| with: | ||
| command: check ${{ matrix.checks }} | ||
| rust-version: 1.97.0 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd drop this to avoid having another source of truth for rust version |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Rust | ||
| target/ | ||
| **/*.rs.bk | ||
|
|
||
| # IDE | ||
| .idea/ | ||
| .vscode/ | ||
| *.swp | ||
| *.swo | ||
|
|
||
| # OS | ||
| .DS_Store | ||
| Thumbs.db | ||
|
|
||
| # Environment | ||
| .env | ||
| .env.local |
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.
please use explicit hashes for the workflow versions