Bump buildpacks/sbt/test-apps/heroku-scala-getting-started from 61340fc
to 928d3c9
#868
This file contains 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 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
contents: read | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
lint: | |
name: Rust Code Linting | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Update Rust toolchain | |
run: rustup update | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Clippy | |
run: cargo clippy --all-targets --locked -- --deny warnings | |
- name: rustfmt | |
run: cargo fmt -- --check | |
unit-test: | |
name: Unit Tests | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Update Rust toolchain | |
run: rustup update | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Run unit tests | |
run: cargo test --locked | |
integration-test: | |
name: Integration Tests (${{ matrix.buildpack-directory }}, ${{matrix.builder}}, ${{matrix.arch}}) | |
runs-on: ${{ matrix.arch == 'arm64' && 'pub-hk-ubuntu-24.04-arm-large' || 'pub-hk-ubuntu-24.04-large' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
builder: [ "builder:24", "builder:22", "builder:20" ] | |
arch: [ "amd64", "arm64" ] | |
buildpack-directory: [ "buildpacks/gradle", "buildpacks/jvm", "buildpacks/jvm-function-invoker", "buildpacks/maven", "buildpacks/sbt" ] | |
exclude: | |
- builder: "builder:22" | |
arch: "arm64" | |
- builder: "builder:20" | |
arch: "arm64" | |
- buildpack-directory: "buildpacks/jvm-function-invoker" | |
builder: "builder:20" | |
- buildpack-directory: "buildpacks/jvm-function-invoker" | |
builder: "builder:24" | |
env: | |
INTEGRATION_TEST_BUILDER: heroku/${{ matrix.builder }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install musl-tools | |
run: sudo apt-get install -y --no-install-recommends musl-tools | |
- 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 | |
- name: Install Pack CLI | |
uses: buildpacks/github-actions/setup-pack@v5.7.4 | |
# The images are pulled up front to prevent duplicate pulls due to the tests being run concurrently. | |
- name: Pull builder image | |
run: docker pull ${{ env.INTEGRATION_TEST_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"}}' '${{ env.INTEGRATION_TEST_BUILDER }}' \ | |
| jq --exit-status --raw-output '.stack.runImage.image' | |
) | |
docker pull "${RUN_IMAGE}" | |
- name: Run integration tests | |
working-directory: ${{ matrix.buildpack-directory }} | |
# Runs only tests annotated with the `ignore` attribute (which in this repo, are the integration tests). | |
run: cargo test --locked -- --ignored --test-threads 16 |