Skip to content

Bump buildpacks/github-actions from 5.7.2 to 5.7.3 #782

Bump buildpacks/github-actions from 5.7.2 to 5.7.3

Bump buildpacks/github-actions from 5.7.2 to 5.7.3 #782

Workflow file for this run

name: CI
on:
push:
# Avoid duplicate builds on PRs.
branches:
- main
pull_request:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Rust toolchain
run: rustup update
- name: Rust Cache
uses: Swatinem/rust-cache@v2.7.3
- name: Clippy
run: cargo clippy --all-targets --locked -- --deny warnings
- name: rustfmt
run: cargo fmt -- --check
unit-test:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Rust toolchain
run: rustup update
- name: Rust Cache
uses: Swatinem/rust-cache@v2.7.3
- name: Run unit tests
run: cargo test --locked
integration-test:
name: integration-tests ${{ matrix.builder }} / ${{ matrix.arch }}
runs-on: ${{ matrix.arch == 'arm64' && 'pub-hk-ubuntu-24.04-arm-medium' || 'ubuntu-24.04' }}
strategy:
matrix:
arch: ["amd64"]
builder: ["heroku/builder:20", "heroku/builder:22", "heroku/builder:24"]
include:
- arch: "arm64"
builder: "heroku/builder:24"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install musl-tools
run: sudo apt-get install musl-tools -y --no-install-recommends
- name: Update Rust toolchain
run: rustup update
- name: Install Rust linux-musl target
run: rustup target add ${{ matrix.arch == 'arm64' && 'aarch64-unknown-linux-musl' || 'x86_64-unknown-linux-musl' }}
- name: Rust Cache
uses: Swatinem/rust-cache@v2.7.3
- name: Install Pack CLI
uses: buildpacks/github-actions/setup-pack@v5.7.3
# The images are pulled up front to prevent duplicate pulls due to the tests being run concurrently.
- name: Pull builder image
run: docker pull ${{ matrix.builder }}
- name: Pull run image
# Using `docker inspect` rather than `pack builder inspect` since the latter makes
# additional requests to Docker Hub even when the image is available locally.
run: |
RUN_IMAGE=$(
docker inspect --format='{{index .Config.Labels "io.buildpacks.builder.metadata"}}' '${{ matrix.builder }}' \
| jq --exit-status --raw-output '.stack.runImage.image'
)
docker pull "${RUN_IMAGE}"
- name: Run integration tests
env:
INTEGRATION_TEST_BUILDER: ${{ matrix.builder }}
# Runs only tests annotated with the `ignore` attribute (which in this repo, are the integration tests).
run: cargo test --locked -- --ignored --test-threads 16