Skip to content

🔄 CI | Nightly

🔄 CI | Nightly #64

Workflow file for this run

name: 🔄 CI | Nightly
on:
workflow_dispatch:
inputs:
branch:
description: "Branch to run the workflow on, e.g. main"
type: string
required: true
schedule:
# Scheduled to run in the morning (PT) on every day-of-week from Monday through Friday.
- cron: '0 15 * * 1-5'
env:
TEST_CLUSTER_NAME: ci-e2etest-nightly
REGISTRY: ${{ secrets.OTELCOMM_AWS_TEST_ACC_ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com/nr-otel-collector
jobs:
slow-tests:
name: Run slow tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch || 'main' }}
fetch-depth: 0 # required for tag metadata
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
check-latest: true
- name: Verify build
run: make ci
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- name: Build binaries & packages with GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: '~> v2'
args: --snapshot --clean --skip=sign --timeout 2h
- name: Extract image version
run: echo "version=$(jq -r '.version' dist/metadata.json)" >> $GITHUB_ENV
- name: Setup local kind cluster
uses: helm/kind-action@v1
with:
version: v0.21.0
cluster_name: ${{ env.TEST_CLUSTER_NAME }}
wait: 60s
- name: Run slow local tests
run: |
IMAGE_TAG=${{ env.version }}-rc-amd64 \
KIND_CLUSTER_NAME=${{ env.TEST_CLUSTER_NAME }} \
NR_BACKEND_URL=${{ secrets.NR_STAGING_BACKEND_URL }} \
NR_INGEST_KEY=${{ secrets.OTELCOMM_NR_INGEST_KEY }} \
NR_API_KEY=${{ secrets.OTELCOMM_NR_API_KEY }} \
NR_ACCOUNT_ID=${{ secrets.OTELCOMM_NR_TEST_ACCOUNT_ID }} \
NR_API_BASE_URL=${{ secrets.NR_STAGING_API_BASE_URL }} \
make -f ./test/e2e/Makefile ci_test-slow
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.OTELCOMM_AWS_TEST_ACC_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.OTELCOMM_AWS_TEST_ACC_SECRET_ACCESS_KEY }}
aws-region: us-east-1
role-to-assume: arn:aws:iam::${{ secrets.OTELCOMM_AWS_TEST_ACC_ACCOUNT_ID }}:role/resource-provisioner
role-skip-session-tagging: true
- name: Login to ECR
uses: docker/login-action@v3
with:
registry: ${{ secrets.OTELCOMM_AWS_TEST_ACC_ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com/nr-otel-collector
- name: Build and publish nightly binaries & packages with GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: '~> v2'
args: --skip=announce,validate --clean --timeout 2h --config .goreleaser-nightly.yaml
- name: Run nightly tests
run: |
NR_API_KEY=${{ secrets.OTELCOMM_NR_API_KEY }} \
NR_ACCOUNT_ID=${{ secrets.OTELCOMM_NR_TEST_ACCOUNT_ID }} \
NR_API_BASE_URL=${{ secrets.NR_STAGING_API_BASE_URL }} \
make -f ./test/e2e/Makefile ci_test-nightly