Skip to content

Merge pull request #708 from carvel-dev/dependabot/go_modules/golang.… #2094

Merge pull request #708 from carvel-dev/dependabot/go_modules/golang.…

Merge pull request #708 from carvel-dev/dependabot/go_modules/golang.… #2094

Workflow file for this run

name: test-gh
on:
push:
branches:
- develop
pull_request:
types: [opened, reopened, synchronize]
jobs:
test-all:
name: Test GH - Linux
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run Tests
run: |
set -e -x
# deploy local registry and run tests
./hack/test-all-local-registry.sh
test-all-windows:
name: Test GH - Windows
runs-on: windows-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install dependencies
run: |
bash -c '
set -e -x
go install github.com/sigstore/cosign/cmd/cosign@v0.5.0
alias cosign=cosign.exe
'
- name: Compile imgpkg
run: |
bash -c '
set -e -x
export IMGPKG_BINARY_EXT=".exe"
./hack/build.sh
'
- name: Run Tests e2e tests
run: |
bash -c '
set -e -x
function cleanup()
{
docker stop registry
}
export IMGPKG_E2E_IMAGE="localhost:5000/github-action-test-relocation-$GITHUB_RUN_ID"
export IMGPKG_E2E_RELOCATION_REPO="localhost:5000/github-action-imgpkg-test-$GITHUB_RUN_ID"
docker run -d -p 5000:5000 --restart=always --name registry ghcr.io/carvel-dev/imgpkg/registry-windows:2.8.0-2022
trap cleanup EXIT
export IMGPKG_BINARY="$PWD/imgpkg.exe"
./hack/test.sh
./hack/test-e2e.sh
echo ALL SUCCESS
'
- name: Run Tests performance
run: |
bash -c '
set -e -x
export IMGPKG_E2E_IMAGE="ttl.sh/github-action-test-relocation-$GITHUB_RUN_ID"
export IMGPKG_E2E_RELOCATION_REPO="ttl.sh/github-action-imgpkg-test-$GITHUB_RUN_ID"
export IMGPKG_BINARY="$PWD/imgpkg.exe"
./hack/test-perf.sh
echo ALL SUCCESS
'