feat: add up_network tool #79
Workflow file for this run
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: ci | |
| permissions: | |
| contents: read | |
| packages: read | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - ready_for_review | |
| env: | |
| CARGO_TERM_COLOR: always | |
| GITHUB_ACTOR: pop-mcp | |
| CARGO_INCREMENTAL: 1 | |
| RUST_BACKTRACE: 1 | |
| RUSTFLAGS: "-Dwarnings" | |
| RUSTDOCFLAGS: "-Dwarnings" | |
| concurrency: | |
| # Cancel any in-progress jobs for the same pull request or branch | |
| group: ci-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| setup: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| image: ${{ steps.out.outputs.image }} | |
| rust_version: ${{ steps.out.outputs.rust_version }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install yq | |
| uses: mikefarah/yq@v4.44.1 | |
| - name: Set environment variables | |
| id: out | |
| run: | | |
| set -xeuo pipefail | |
| HASH=$(sha256sum Dockerfile.ci | cut -d ' ' -f 1) | |
| RUST_VERSION=$(yq -r '.toolchain.channel' rust-toolchain.toml) | |
| echo "rust_version=$RUST_VERSION" >> "$GITHUB_OUTPUT" | |
| echo "image=ghcr.io/${GITHUB_REPOSITORY,,}:${RUST_VERSION}-${HASH}" >> "$GITHUB_OUTPUT" | |
| prepare-ci-image: | |
| needs: | |
| - setup | |
| uses: ./.github/workflows/docker-ci.yml | |
| permissions: | |
| contents: read | |
| packages: write | |
| with: | |
| docker_image: ${{ needs.setup.outputs.image }} | |
| rust_version: ${{ needs.setup.outputs.rust_version }} | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust nightly | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: nightly | |
| profile: minimal | |
| components: rustfmt | |
| override: true | |
| - name: Check formatting | |
| run: cargo +nightly fmt --all -- --check | |
| build: | |
| needs: | |
| - setup | |
| - lint | |
| - prepare-ci-image | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ${{ needs.setup.outputs.image }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: true | |
| shared-key: shared-${{ github.head_ref || github.ref_name }} | |
| - name: Check no default features | |
| run: cargo check --locked --no-default-features | |
| - name: Check all features | |
| run: cargo check --locked --all-features | |
| - name: Check default features | |
| run: cargo check --locked | |
| tests: | |
| needs: | |
| - setup | |
| - lint | |
| - prepare-ci-image | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ${{ needs.setup.outputs.image }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: shared-tests-${{ github.head_ref || github.ref_name }} | |
| - name: Run tests | |
| run: cargo test --locked | |
| clippy: | |
| needs: | |
| - build | |
| - setup | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ${{ needs.setup.outputs.image }} | |
| permissions: | |
| checks: write | |
| packages: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: false | |
| shared-key: shared-${{ github.head_ref || github.ref_name }} | |
| - name: Annotate with Clippy warnings | |
| uses: actions-rs/clippy-check@v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| args: --all-targets -- -D warnings | |
| docs: | |
| needs: | |
| - setup | |
| - build | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ${{ needs.setup.outputs.image }} | |
| permissions: | |
| checks: write | |
| packages: read | |
| env: | |
| RUSTDOCFLAGS: "-Dwarnings -Dmissing_docs" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: false | |
| shared-key: shared-docs-${{ github.head_ref || github.ref_name }} | |
| - name: Check no default features | |
| run: cargo doc --locked --no-deps | |
| documentation-tests: | |
| needs: | |
| - setup | |
| - build | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ${{ needs.setup.outputs.image }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: false | |
| shared-key: shared-${{ github.head_ref || github.ref_name }} | |
| - name: Run doc tests | |
| run: cargo test --locked --doc |