Skip to content

v1.0.3

v1.0.3 #35

Workflow file for this run

name: Go Tests
on:
pull_request:
branches: [ master ]
jobs:
test:
name: Run Go tests
runs-on: ubuntu-latest
env: # Set environment variables for the whole job
LOGZIO_API_URL: https://api.logz.io
LOGZIO_API_TOKEN: ${{ secrets.LOGZIO_API_TOKEN }}
RULES_DS: ${{ secrets.RULES_DS }}
RULES_CONFIGMAP_ANNOTATION: prometheus.io/kube-rules
ALERTMANAGER_CONFIGMAP_ANNOTATION: prometheus.io/kube-alertmanager
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.19'
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Install Kind
run: |
curl -Lo ./kind "https://kind.sigs.k8s.io/dl/v0.11.1/kind-Linux-amd64"
chmod +x ./kind
mv ./kind /usr/local/bin/kind
- name: Create a Kubernetes cluster
run: |
kind create cluster
kubectl cluster-info
- name: Create namespace
run: |
kubectl create namespace alert-migrator-test
- name: Get dependencies
run: go mod download
- name: Run tests
run: go test ./... -cover