Skip to content

Commit

Permalink
WIP: Use binaries in Container tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jamlo committed Oct 28, 2024
1 parent d686206 commit 9a0134d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 23 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,26 +46,16 @@ jobs:
PRIVATE_KEY_PASSPHRASE: ${{ secrets.PRIVATE_KEY_PASSPHRASE }}
run: |
# Add Keys to expected files
touch /tmp/private.pem
touch /tmp/public.pem
chmod 600 /tmp/private.pem
chmod 600 /tmp/public.pem
echo "${PRIVATE_PEM}" > /tmp/private.pem
echo "${PUBLIC_PEM}" > /tmp/public.pem
# list tmp to check
ls -lth /tmp/p*
echo "first 5 characters of /tmp/private"
head -c 5 /tmp/private.pem
echo "first 5 characters of /tmp/public"
head -c 5 /tmp/public.pem
echo "${PRIVATE_PEM}" > /tmp/private.pem && chmod 600 /tmp/private.pem
echo "${PUBLIC_PEM}" > /tmp/public.pem && chmod 600 /tmp/public.pem
# Start build
echo "Building bacalhau binary for: ${GOOS} ${GOARCH}"
echo "==> Building bacalhau binary for: ${GOOS} ${GOARCH}..."
make build-bacalhau-tgz
echo "Built bacalhau binary for: ${GOOS} ${GOARCH}"
echo "===> Done building bacalhau binary."
# Listing Builds
echo "===> Built Artifacts:"
ls -lh dist/
- name: Upload binary artifacts
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ jobs:
uses: ./.github/workflows/build.yml
secrets: inherit

# integration-tests:
# needs: build
# if: success()
# uses: ./.github/workflows/testcontainers-integration-tests.yml
integration-tests:
needs: build
if: success()
uses: ./.github/workflows/testcontainers-integration-tests.yml
with:
os: linux
arch: amd64
21 changes: 18 additions & 3 deletions .github/workflows/testcontainers-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
name: Test Containers Integration Tests
name: TestContainers Testing

on:
workflow_call:
inputs:
os:
required: true
type: string
arch:
required: true
type: string

jobs:
test-build-and-run-testcontainers:
Expand All @@ -10,6 +17,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Download compiled binary
uses: actions/download-artifact@v4
with:
name: ${{ inputs.os }}-${{ inputs.arch }}
path: tmp/

- name: Install Golang
uses: actions/setup-go@v5
with:
Expand All @@ -22,5 +35,7 @@ jobs:
# TODO: make WebUI happy when compiling
mkdir -p webui/build
echo "hello test" > webui/build/index.html
cd test_integration
go test -v -count=1 ./...
echo "===> tmp folder contents"
ls -lt tmp
# cd test_integration
# go test -v -count=1 ./...

0 comments on commit 9a0134d

Please sign in to comment.