Skip to content

Merge pull request #552 from phenixblue/add-labels-for-bundles-and-im… #1703

Merge pull request #552 from phenixblue/add-labels-for-bundles-and-im…

Merge pull request #552 from phenixblue/add-labels-for-bundles-and-im… #1703

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: Set up Go 1.x
uses: actions/setup-go@v1
with:
go-version: "1.20.5"
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
path: src/github.com/${{ github.repository }}
- name: Run Tests
run: |
set -e -x
export GOPATH=$(echo `pwd`)
export PATH="$PATH:$GOPATH/bin"
cd src/github.com/${{ github.repository }}
# 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: Set up Go 1.x
uses: actions/setup-go@v1
with:
go-version: "1.20.5"
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
path: src/github.com/${{ github.repository }}
- name: Install dependencies
run: |
bash -c '
set -e -x
export GOPATH=$(echo `pwd`)
export PATH="$GOPATH/bin:$PATH"
go install github.com/sigstore/cosign/cmd/[email protected]
alias cosign=cosign.exe
'
- name: Compile imgpkg
run: |
bash -c '
set -e -x
export GOPATH=$(echo `pwd`)
export PATH="$GOPATH/bin:$PATH"
cd src/github.com/${{ github.repository }}
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 GOPATH=$(echo `pwd`)
export PATH="$GOPATH/bin:$PATH"
cd src/github.com/${{ github.repository }}
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 GOPATH=$(echo `pwd`)
export PATH="$GOPATH/bin:$PATH"
cd src/github.com/${{ github.repository }}
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
'