run tests #152
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: Build tagged Docker image | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- 'v*' | |
env: | |
REGISTRY: quay.io | |
IMAGE_NAME: stackstate/sts-opentelemetry-collector | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
labels: | | |
org.opencontainers.image.source=https://github.com/${{github.repository_owner}}/${{ github.repository }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to the container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USER }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64/v8 | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
test: | |
runs-on: ubuntu-latest | |
services: | |
clickhouse: | |
image: clickhouse/clickhouse-server:latest | |
ports: | |
- "9000:9000" | |
- "8123:8123" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
- name: Run tests | |
run: | | |
go test ./exporter/clickhousestsexporter/... | |
go test ./exporter/ststopologyexporter/... | |
go test ./extension/ingestionapikeyauthextension/... | |
go test ./connector/stsservicegraphconnector/... |