-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent issues with Docker Hub rate limits in CI (#124)
Switches to the new GitHub Actions runner groups to: 1. Avoid the rate limit issues mentioned in: heroku/buildpacks-go#283 2. To update to Ubuntu 24.04 Also pre-pulls the builder and run images to prevent duplicate pulls and impact on rate limits, as mentioned in: heroku/buildpacks-python#223 See also: https://salesforce.quip.com/bu6UA0KImOxJ#temp:C:GZR57becb9df8d94f80b132168fd https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md GUS-W-16238120.
- Loading branch information
Showing
2 changed files
with
14 additions
and
4 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ env: | |
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
@@ -29,7 +29,7 @@ jobs: | |
run: cargo fmt -- --check | ||
|
||
unit-test: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
@@ -51,7 +51,7 @@ jobs: | |
arch: "arm64" | ||
- builder: "builder:20" | ||
arch: "arm64" | ||
runs-on: ${{ matrix.arch == 'arm64' && 'pub-hk-ubuntu-22.04-arm-medium' || 'ubuntu-latest' }} | ||
runs-on: ${{ matrix.arch == 'arm64' && 'pub-hk-ubuntu-24.04-arm-medium' || 'ubuntu-24.04' }} | ||
env: | ||
INTEGRATION_TEST_CNB_BUILDER: heroku/${{ matrix.builder }} | ||
steps: | ||
|
@@ -69,8 +69,18 @@ jobs: | |
uses: Swatinem/[email protected] | ||
- name: Install Pack CLI | ||
uses: buildpacks/github-actions/[email protected] | ||
# 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_CNB_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_CNB_BUILDER }}' \ | ||
| jq --exit-status --raw-output '.stack.runImage.image' | ||
) | ||
docker pull "${RUN_IMAGE}" | ||
# The integration tests are annotated with the `ignore` attribute, allowing us to run | ||
# only those and not the unit tests, via the `--ignored` option. On the latest stack | ||
# we run all integration tests, but on older stacks we only run stack-specific tests. | ||
|