mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-10 15:47:36 +02:00
Switch integration tests from minikube to kind (#656)
This commit is contained in:
parent
c29f1932d6
commit
1dc1c870c3
2 changed files with 20 additions and 42 deletions
32
.github/workflows/test.yaml
vendored
32
.github/workflows/test.yaml
vendored
|
@ -89,46 +89,32 @@ jobs:
|
|||
integration-tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: cache binaries
|
||||
uses: actions/cache@v1
|
||||
env:
|
||||
cache-name: cache-binaries
|
||||
with:
|
||||
path: /opt/binaries/
|
||||
key: ${{ runner.os }}-binaries
|
||||
- name: install binaries
|
||||
- name: install mkcert
|
||||
run: |
|
||||
#!/bin/bash
|
||||
sudo mkdir -p /usr/local/bin/
|
||||
sudo mkdir -p /opt/minikube/bin/
|
||||
cd /opt/minikube/bin
|
||||
|
||||
if [ ! -f minikube ]; then
|
||||
echo "downloading minikube"
|
||||
sudo curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
|
||||
sudo chmod +x minikube
|
||||
fi
|
||||
sudo install minikube /usr/local/bin/
|
||||
|
||||
if [ ! -f mkcert ]; then
|
||||
echo "downloading mkcert"
|
||||
sudo curl -Lo mkcert https://github.com/FiloSottile/mkcert/releases/download/v1.4.1/mkcert-v1.4.1-linux-amd64
|
||||
sudo chmod +x mkcert
|
||||
fi
|
||||
sudo install mkcert /usr/local/bin/
|
||||
- name: start minikube
|
||||
run: |
|
||||
minikube start --driver=docker
|
||||
kubectl cluster-info
|
||||
|
||||
- name: Create kind cluster
|
||||
uses: helm/kind-action@v1.0.0-rc.1
|
||||
with:
|
||||
cluster_name: kind
|
||||
|
||||
- name: install go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.14.x
|
||||
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: build dev docker image
|
||||
run: |
|
||||
./scripts/build-dev-docker.bash
|
||||
|
||||
- name: test
|
||||
run: go test -v ./integration/...
|
||||
|
|
|
@ -17,7 +17,6 @@ env GOOS=linux \
|
|||
# build docker image
|
||||
(
|
||||
|
||||
|
||||
cd $_dir
|
||||
cat <<EOF >config.yaml
|
||||
|
||||
|
@ -31,12 +30,5 @@ ENTRYPOINT [ "/bin/pomerium" ]
|
|||
CMD ["-config","/pomerium/config.yaml"]
|
||||
EOF
|
||||
docker build --tag=pomerium/pomerium:dev .
|
||||
|
||||
# build for minikube
|
||||
if command -v minikube >/dev/null 2>&1 ; then
|
||||
eval "$(minikube docker-env --shell=bash)"
|
||||
docker build --tag=pomerium/pomerium:dev .
|
||||
fi
|
||||
|
||||
|
||||
kind load docker-image pomerium/pomerium:dev
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue