generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e166171
commit 0f06d36
Showing
2 changed files
with
19 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
name: Build Cache | ||
description: Cache builds | ||
inputs: | ||
docker: | ||
description: If the test should load docker images | ||
required: false | ||
default: false | ||
runs: | ||
using: "composite" | ||
# Make sure to keep these cache entries in sync with those in writecache.yml | ||
|
@@ -22,6 +27,7 @@ runs: | |
${{ runner.os }}-hermit-cache- | ||
- name: Restore Docker Images | ||
uses: ScribeMD/[email protected] | ||
if: inputs.docker == 'true' | ||
with: | ||
key: docker-${{ runner.os }}-${{ hashFiles('docker-compose.yml') }} | ||
read-only: true | ||
|
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 |
---|---|---|
|
@@ -267,12 +267,23 @@ jobs: | |
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Check if Docker Required | ||
id: check-docker | ||
run: | | ||
result="$(git grep -E '//ftl:subscribe|DefaultPostgresDatabaseConfig|DefaultMySQLDatabaseConfig' -- "$(git grep -l '^//go:build integration' | xargs grep -l '^func ${{ matrix.test }}' | xargs -I {} dirname ./{})/testdata" || true)" | ||
if [ -z "$result" ]; then | ||
echo "docker not required" | ||
echo "docker_req=false" >> "$GITHUB_ENV" | ||
else | ||
echo "docker required" | ||
echo "docker_req=true" >> "$GITHUB_ENV" | ||
fi | ||
- name: Build Cache | ||
uses: ./.github/actions/build-cache | ||
with: | ||
docker: ${{ env.docker_req }} | ||
- name: Init Hermit | ||
uses: cashapp/[email protected] | ||
- name: Docker Compose | ||
run: just compose-up | ||
- name: Download Go Modules | ||
run: go mod download | ||
- name: Build Language Plugins | ||
|