refacto: remove package events aliases #77
Workflow file for this run
This file contains 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: Go | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
COMPOSE_FILE: e2e_test/docker-compose.yaml | |
jobs: | |
build: | |
name: "Lint and test" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.20" | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v3.2.0 | |
- name: Test | |
run: go test -v ./... | |
- name: Build salt-exporter | |
run: go build -v ./cmd/salt-exporter | |
- name: Build salt-live | |
run: go build -v ./cmd/salt-live | |
e2e: | |
name: "End-to-end tests" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.20" | |
- name: Set up environment | |
run: docker compose -f $COMPOSE_FILE up -d --wait --wait-timeout 60 | |
- name: Run some Salt commands | |
run: docker compose -f $COMPOSE_FILE exec salt_master sh /test/exec_commands.sh | |
- name: Test | |
run: go test -v -tags=e2e ./e2e_test/... | |
- name: Print metrics if failed | |
if: failure() | |
run: curl 127.0.0.1:2112/metrics | grep salt_ | |
- name: "Clean up environment" | |
if: always() | |
run: docker compose -f $COMPOSE_FILE down |