|
| 1 | +name: integration tests (linux) |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ duct-tape ] |
| 6 | + pull_request: |
| 7 | + branches: [ duct-tape ] |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +permissions: read-all |
| 11 | + |
| 12 | +jobs: |
| 13 | + |
| 14 | + test: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + steps: |
| 17 | + - uses: actions/setup-go@v2 |
| 18 | + with: |
| 19 | + go-version: ^1.16 |
| 20 | + |
| 21 | + - uses: actions/checkout@v2 |
| 22 | + with: |
| 23 | + fetch-depth: 0 |
| 24 | + |
| 25 | + - uses: actions/cache@v2 |
| 26 | + with: |
| 27 | + path: ~/go/pkg/mod |
| 28 | + key: ${{ runner.os }}-gopkgmod-${{ hashFiles('**/go.sum') }} |
| 29 | + restore-keys: | |
| 30 | + ${{ runner.os }}-gopkgmod |
| 31 | +
|
| 32 | + - name: Install required tools |
| 33 | + run: | |
| 34 | + set -e |
| 35 | + mkdir -p $HOME/bin |
| 36 | + curl -Lo $HOME/bin/skaffold https://storage.googleapis.com/skaffold/builds/latest/skaffold-linux-amd64 |
| 37 | + curl -Lo $HOME/bin/container-structure-test https://storage.googleapis.com/container-structure-test/latest/container-structure-test-linux-amd64 |
| 38 | + curl -Lo $HOME/bin/kind https://github.com/kubernetes-sigs/kind/releases/download/v0.9.0/kind-linux-amd64 |
| 39 | + curl -Lo $HOME/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/linux/amd64/kubectl |
| 40 | + chmod +x $HOME/bin/* |
| 41 | + export PATH=$HOME/bin:$PATH |
| 42 | +
|
| 43 | + - name: Run nodejs helper tests |
| 44 | + run: | |
| 45 | + set -e |
| 46 | + (cd nodejs/helper-image; go test .) |
| 47 | +
|
| 48 | + - name: Run python helper tests |
| 49 | + run: | |
| 50 | + set -e |
| 51 | + (cd python/helper-image/launcher; go test .) |
| 52 | +
|
| 53 | + - name: Run image build |
| 54 | + run: | |
| 55 | + set -e |
| 56 | + # Create a kind configuration to use the docker daemon's configured registry-mirrors. |
| 57 | + docker system info --format '{{printf "apiVersion: kind.x-k8s.io/v1alpha4\nkind: Cluster\ncontainerdConfigPatches:\n"}}{{range $reg, $config := .RegistryConfig.IndexConfigs}}{{if $config.Mirrors}}{{printf "- |-\n [plugins.\"io.containerd.grpc.v1.cri\".registry.mirrors.\"%s\"]\n endpoint = %q\n" $reg $config.Mirrors}}{{end}}{{end}}' > /tmp/kind.config |
| 58 | +
|
| 59 | + # `kind create cluster` is very verbose |
| 60 | + kind create cluster --quiet --config /tmp/kind.config |
| 61 | + kind get kubeconfig > /tmp/kube.config |
| 62 | +
|
| 63 | + # we had `run-its.sh` in `after_success` but it doesn't cause failures |
| 64 | + KUBECONFIG=/tmp/kube.config bash ./run-its.sh |
0 commit comments