Repository navigation
refactor(core): wrap market/currency data in Arc for shared ownership #31
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
| name: Rust | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v*' | |
| pull_request: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| check: | |
| name: Check compilation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "rust-cache-check" | |
| cache-on-failure: true | |
| - name: Check with all features | |
| run: cargo check --all-features | |
| - name: Check without default features | |
| run: cargo check --no-default-features | |
| lint: | |
| name: Clippy lints | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "rust-cache-lint" | |
| cache-on-failure: true | |
| - name: Run clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| test: | |
| name: Test - ${{ matrix.build }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| build: [msrv, stable, macos, windows] | |
| include: | |
| - build: msrv | |
| os: ubuntu-latest | |
| rust: 1.91.0 | |
| - build: stable | |
| os: ubuntu-latest | |
| rust: stable | |
| - build: macos | |
| os: macos-latest | |
| rust: stable | |
| - build: windows | |
| os: windows-latest | |
| rust: stable | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "rust-cache-${{ matrix.os }}" | |
| cache-on-failure: true | |
| - name: Run all tests | |
| run: cargo test --all-features | |
| fmt: | |
| name: Format check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "rust-cache-fmt" | |
| cache-on-failure: true | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| doc: | |
| name: Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "rust-cache-doc" | |
| cache-on-failure: true | |
| - name: Check documentation | |
| run: cargo doc --no-deps --all-features --document-private-items | |
| env: | |
| RUSTDOCFLAGS: "-D warnings" | |
| security: | |
| name: Security audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "rust-cache-security" | |
| cache-on-failure: true | |
| - name: Generate lockfile | |
| run: cargo generate-lockfile | |
| - uses: rustsec/audit-check@v2 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| ignore: RUSTSEC-2023-0071, RUSTSEC-2024-0436 |