chore(deps): bump pulumi/pulumi-go (#611) #305
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Integration tests | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
jobs: | |
integration-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Setup Go | |
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 | |
with: | |
go-version-file: 'deploy/go.mod' | |
- name: Set up Docker registry | |
run: | | |
docker network create kind || true | |
docker run -d --network kind --name registry -p 5000:5000 registry:2 | |
- name: Write config file | |
run: | | |
cat <<EOF > kind-config.yaml | |
apiVersion: kind.x-k8s.io/v1alpha4 | |
kind: Cluster | |
containerdConfigPatches: | |
- | | |
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"] | |
endpoint = ["http://registry:5000"] | |
kubeadmConfigPatches: | |
- | | |
kind: ClusterConfiguration | |
apiServer: | |
extraArgs: | |
"service-node-port-range": "30000-30005" | |
nodes: | |
- role: control-plane | |
extraPortMappings: | |
- containerPort: 80 | |
hostPort: 80 | |
- containerPort: 30000 | |
hostPort: 30000 | |
- containerPort: 30001 | |
hostPort: 30001 | |
- containerPort: 30002 | |
hostPort: 30002 | |
- containerPort: 30003 | |
hostPort: 30003 | |
- containerPort: 30004 | |
hostPort: 30004 | |
- containerPort: 30005 | |
hostPort: 30005 | |
EOF | |
- name: Set up Kind cluster | |
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # 1.12.0 | |
with: | |
version: v0.20.0 | |
config: kind-config.yaml | |
cluster_name: kind | |
env: | |
KIND_EXPERIMENTAL_DOCKER_NETWORK: kind | |
- name: Export server URL | |
id: server | |
run: | | |
echo "server=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' kind-control-plane)" >> "$GITHUB_OUTPUT" | |
- name: Build and push CM | |
run: | | |
docker build \ | |
-t localhost:5000/ctferio/chall-manager:${{ github.sha }} \ | |
-f Dockerfile.chall-manager \ | |
. | |
docker push localhost:5000/ctferio/chall-manager:${{ github.sha }} | |
- name: Build and push CMJ | |
run: | | |
docker build \ | |
-t localhost:5000/ctferio/chall-manager-janitor:${{ github.sha }} \ | |
-f Dockerfile.chall-manager-janitor \ | |
. | |
docker push localhost:5000/ctferio/chall-manager-janitor:${{ github.sha }} | |
- name: Install Pulumi | |
uses: pulumi/actions@9519177da243fd32cab35cdbf19cce1ab7472fcc # v6.2.0 | |
- name: Prepare environment | |
run: | | |
pulumi login --local | |
kubectl create ns cm-in-ci | |
- name: Run Integration Tests | |
run: | | |
go test -v ./deploy/integration/ -run=^Test_I_ -coverprofile=cov.out -timeout=30m | |
env: | |
REGISTRY: localhost:5000 | |
TAG: ${{ github.sha }} | |
ROMEO_CLAIM_NAME: ${{ steps.env.outputs.claim-name }} | |
SERVER: ${{ steps.server.outputs.server }} | |
- name: Upload coverage to Coveralls | |
uses: shogo82148/actions-goveralls@e6875f831db61e6abffbd8df91a2eb6cd24b46c9 # v1.9.1 | |
with: | |
path-to-profile: 'cov.out' |