mirror of
https://github.com/eliasstepanik/caddy-ingess.git
synced 2026-01-10 03:58:28 +00:00
96 lines
2.2 KiB
YAML
96 lines
2.2 KiB
YAML
name: Checks
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
|
|
jobs:
|
|
go-tests:
|
|
name: Run tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.18
|
|
|
|
- name: Test
|
|
run: go test -v ./...
|
|
|
|
chart-test-current:
|
|
name: Test and lint charts
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Helm
|
|
uses: azure/setup-helm@v1
|
|
with:
|
|
version: v3.8.1
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.18
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
with:
|
|
platforms: arm64
|
|
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.7
|
|
|
|
- name: Set up chart-testing
|
|
uses: helm/chart-testing-action@v2.2.1
|
|
|
|
- name: Run chart-testing (lint)
|
|
run: ct lint --config ct.yaml
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v2
|
|
with:
|
|
distribution: goreleaser
|
|
version: latest
|
|
args: release --snapshot --rm-dist
|
|
env:
|
|
# Fix tag for snapshots
|
|
GORELEASER_CURRENT_TAG: v0.0.1
|
|
GORELEASER_PREVIOUS_TAG: v0.0.0
|
|
|
|
|
|
- name: Create kind cluster
|
|
uses: helm/kind-action@v1.2.0
|
|
|
|
- name: Install MetalLB to allow LoadBalancer services
|
|
run: |
|
|
kubectl create ns metallb-system
|
|
kubectl apply -f https://raw.githubusercontent.com/google/metallb/v0.9.3/manifests/metallb.yaml
|
|
cat <<EOF | kubectl apply -f -
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: config
|
|
namespace: metallb-system
|
|
data:
|
|
config: |
|
|
address-pools:
|
|
- name: default
|
|
protocol: layer2
|
|
addresses:
|
|
- 172.17.255.1-172.17.255.200
|
|
EOF
|
|
|
|
- name: Load image into Kind cluster
|
|
run: kind load docker-image "caddy/ingress:test-image" --name chart-testing
|
|
|
|
- name: Run chart-testing (install)
|
|
run: ct install --config ct.yaml
|