feat: add Shopify/toxiproxy image
#1139
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: Continuous Integration | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - "**" | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| concurrency: | |
| group: ${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| msrv: | |
| name: Build with MSRV | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v5 | |
| - name: Get current MSRV from Cargo.toml | |
| id: current_msrv | |
| run: | | |
| msrv=$(cat Cargo.toml | grep rust-version | sed 's/.* = "//; s/"//') | |
| echo "msrv=$msrv" >> $GITHUB_OUTPUT | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1.16.1 | |
| with: | |
| toolchain: ${{ steps.current_msrv.outputs.msrv }} | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-hack | |
| - name: Build | |
| run: cargo hack build --each-feature --keep-going | |
| clippy: | |
| name: Clippy check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v5 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1.16.1 | |
| with: | |
| toolchain: stable | |
| components: clippy | |
| - name: Clippy check | |
| run: cargo clippy --all-features | |
| fmt: | |
| name: Rustfmt check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v5 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1.16.1 | |
| with: | |
| toolchain: nightly | |
| components: rustfmt | |
| - run: cargo +nightly fmt --all -- --check | |
| prlint: | |
| name: PR name check | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: CondeNast/conventional-pull-request-action@v0.2.0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| # For PRs we gonna use squash-strategy, so commits names not so matter | |
| ignoreCommits: "true" | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| toolchain: | |
| - stable | |
| - nightly | |
| partition: | |
| - 1/4 | |
| - 2/4 | |
| - 3/4 | |
| - 4/4 | |
| steps: | |
| - name: Free Disk Space - Ubuntu Runners | |
| uses: endersonmenezes/free-disk-space@v3.2.2 | |
| with: | |
| remove_android: true | |
| remove_dotnet: true | |
| remove_haskell: true | |
| remove_tool_cache: true | |
| remove_swap: true | |
| - name: Derive Safe Cache Key | |
| id: safe-cache-key | |
| run: | | |
| SAFE_KEY=$(echo "${{ matrix.partition }}" | tr '/' '-') | |
| echo "safe_key=$SAFE_KEY" >> $GITHUB_OUTPUT | |
| - name: Checkout sources | |
| uses: actions/checkout@v5 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1.16.1 | |
| with: | |
| toolchain: ${{ matrix.toolchain }} | |
| cache-key: "partition-${{ steps.safe-cache-key.outputs.safe_key }}" | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-hack | |
| - name: Install Protoc # for pulsar tests | |
| uses: arduino/setup-protoc@v3 | |
| - name: Install the latest Oracle instant client # for Oracle tests | |
| run: | | |
| sudo ln -s /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1 | |
| curl -Lo basic.zip https://download.oracle.com/otn_software/linux/instantclient/instantclient-basic-linuxx64.zip | |
| mkdir linux | |
| unzip basic.zip -d linux -x "META-INF/*" | |
| IC_DIR=$PWD/$(ls -d linux/instantclient*) | |
| echo LD_LIBRARY_PATH=$IC_DIR:$LD_LIBRARY_PATH >> $GITHUB_ENV | |
| echo $IC_DIR >> $GITHUB_PATH | |
| - name: Tests | |
| run: cargo hack test --each-feature --exclude-all-features --partition ${{ matrix.partition }} |