1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-21 11:48:53 +00:00

initial GH actions

This commit is contained in:
paulfantom 2020-09-07 16:27:20 +02:00
parent e9b1081f10
commit 52d9790329
No known key found for this signature in database
GPG key ID: 12AE0185401674E7
2 changed files with 141 additions and 0 deletions
.github/workflows

81
.github/workflows/e2e.yaml vendored Normal file
View file

@ -0,0 +1,81 @@
name: end-to-end
on:
- push
- pull_request
jobs:
prometheus:
runs-on: ubuntu-latest
name: prometheus tests
steps:
- uses: actions/checkout@v2
- name: Start minikube
uses: manusa/actions-setup-minikube@v2.0.0
with:
minikube version: 1.13.0
kubernetes version: 1.18.1
- name: Try the cluster !
run: kubectl get pods -A
- name: Build image
run: |
export SHELL=/bin/bash
eval $(minikube -p minikube docker-env)
make build image
echo -n "verifying images:"
docker images
- name: Apply minikube config
run: |
minikube update-context
kubectl apply -f scripts/minikube-rbac.yaml
- name: Run tests
run:
EXCLUDE_ALERTMANAGER_TESTS=true EXCLUDE_THANOS_TESTS=true make test-e2e
alertmanager:
runs-on: ubuntu-latest
name: alertmanager tests
steps:
- uses: actions/checkout@v2
- name: Start minikube
uses: manusa/actions-setup-minikube@v2.0.0
with:
minikube version: 1.13.0
kubernetes version: 1.18.1
- name: Try the cluster !
run: kubectl get pods -A
- name: Build image
run: |
export SHELL=/bin/bash
eval $(minikube -p minikube docker-env)
make build image
echo -n "verifying images:"
docker images
- name: Apply minikube RBAC
run: |
kubectl apply -f scripts/minikube-rbac.yaml
- name: Run tests
run:
EXCLUDE_PROMETHEUS_TESTS=true EXCLUDE_THANOS_TESTS=true make test-e2e
thanosruler:
runs-on: ubuntu-latest
name: thanos ruler tests
steps:
- uses: actions/checkout@v2
- name: Start minikube
uses: manusa/actions-setup-minikube@v2.0.0
with:
minikube version: 1.13.0
kubernetes version: 1.18.1
- name: Try the cluster !
run: kubectl get pods -A
- name: Build image
run: |
export SHELL=/bin/bash
eval $(minikube -p minikube docker-env)
make build image
echo -n "verifying images:"
docker images
- name: Apply minikube RBAC
run: |
kubectl apply -f scripts/minikube-rbac.yaml
- name: Run tests
run:
EXCLUDE_ALERTMANAGER_TESTS=true EXCLUDE_PROMETHEUS_TESTS=true make test-e2e

60
.github/workflows/tests.yaml vendored Normal file
View file

@ -0,0 +1,60 @@
name: tests
on:
- push
- pull_request
jobs:
generate:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
name: generate and format
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.14'
- run: make --always-make format generate && git diff --exit-code
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
name: build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.14'
- run: make operator
po-rule-migration:
runs-on: ubuntu-latest
name: Build Prometheus Operator rule config map to rule file CRDs CLI tool
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.14'
- run: cd cmd/po-rule-migration && go install
unit-tests:
runs-on: ubuntu-latest
name: Unit tests
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.14'
- run: make test-unit
extended-tests:
runs-on: ubuntu-latest
name: Extended tests
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.14'
- run: make test-long