Update libcnb from 0.14.0 to 0.15.0 #579
Workflow file for this run
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-22.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-22.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 }}) | |
runs-on: pub-hk-ubuntu-22.04-large | |
needs: gather-repo-metadata | |
strategy: | |
fail-fast: false | |
matrix: | |
buildpack-directory: ${{ fromJson(needs.gather-repo-metadata.outputs.buildpack_dirs) }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install musl-tools | |
run: sudo apt-get install musl-tools --no-install-recommends | |
- name: Update Rust toolchain | |
run: rustup update | |
- name: Install Rust linux-musl target | |
run: rustup target add x86_64-unknown-linux-musl | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install Pack CLI | |
uses: buildpacks/github-actions/[email protected] | |
- 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 | |
gather-repo-metadata: | |
name: "Gather Repository Metadata" | |
runs-on: ubuntu-22.04 | |
outputs: | |
buildpack_dirs: ${{ steps.find-buildpack-dirs.outputs.buildpack_dirs }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- id: find-buildpack-dirs | |
name: Find buildpack directories | |
run: echo "buildpack_dirs=$(find . -type f -name 'buildpack.toml' -exec dirname {} \; | grep -v './meta-buildpacks' | sort | uniq | jq -nRc '[inputs]')" >> $GITHUB_OUTPUT |