[#167] rmcp 3.1.1 #441
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 CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install stable toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| components: rustfmt, clippy | |
| override: true | |
| - name: Run cargo fmt | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: fmt | |
| args: --all --check | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install stable toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| components: rustfmt, clippy | |
| override: true | |
| - name: Run cargo check | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: check | |
| unit-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install stable toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - name: Run cargo test | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: test | |
| args: --lib | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install stable toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| components: clippy | |
| override: true | |
| - name: Run cargo clippy | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: clippy | |
| args: -- -D warnings # Treat clippy warnings as errors | |
| audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run cargo audit | |
| uses: rustsec/audit-check@v1.4.1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| full-test: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: docker.io/rockylinux/rockylinux:10 | |
| options: --privileged -v /var/run/docker.sock:/var/run/docker.sock | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run integration tests | |
| run: | | |
| set -o pipefail | |
| mkdir -p /tmp/pgmoneta-test/log | |
| chmod u+x ./test/check.sh | |
| ./test/check.sh ci 2>&1 | tee /tmp/pgmoneta-test/log/test.log | |
| - name: Upload full logs | |
| if: always() | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: full-logs | |
| path: /tmp/pgmoneta-test/log/test.log | |
| if-no-files-found: ignore |