Skip to content

fix: use --experimental instead of -X in examples #130

fix: use --experimental instead of -X in examples

fix: use --experimental instead of -X in examples #130

name: Test setup action
on:
push:
branches: ['*']
# Release-only artifacts: no CLI or action code changed, and the release binary
# may not be available yet when these commits land.
paths-ignore:
- 'Formula/**'
- 'CHANGELOG.md'
- .chloggen/**
workflow_dispatch:
jobs:
test-rejects-old-version:
name: 'Rejects version below minimum'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Dash0 CLI at 1.0.0
id: setup
continue-on-error: true
uses: ./.github/actions/setup
with:
version: '1.0.0'
cache: 'false'
- name: Verify setup failed
run: |
[ "${{ steps.setup.outcome }}" = "failure" ] || { echo "Error: expected failure but got ${{ steps.setup.outcome }}"; exit 1; }
test-pinned-version:
name: 'Install pinned version'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Dash0 CLI
id: setup
uses: ./.github/actions/setup
with:
version: '1.1.0'
cache: 'false'
- name: Verify pinned version
run: |
dash0 version | grep '1.1.0'
[ "${{ steps.setup.outputs.version }}" = "1.1.0" ]
test-pinned-version-v-prefix:
name: 'Install pinned version (v prefix)'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Dash0 CLI
id: setup
uses: ./.github/actions/setup
with:
version: 'v1.1.0'
cache: 'false'
- name: Verify v prefix is stripped
run: |
dash0 version | grep '1.1.0'
[ "${{ steps.setup.outputs.version }}" = "1.1.0" ]
test-profiles:
name: 'Profile creation'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Dash0 CLI
uses: ./.github/actions/setup
with:
cache: 'false'
- name: Verify version matches
run: dash0 version | grep "${{ steps.setup.outputs.version }}"
- name: 'Test: no profile when no config inputs'
run: |
OUTPUT=$(dash0 config profiles list 2>&1 || true)
echo "$OUTPUT"
echo "$OUTPUT" | grep -i 'no profiles'
- name: 'Test: all fields'
run: |
dash0 config profiles create default \
--api-url https://api.example.com \
--otlp-url https://ingress.example.com \
--auth-token auth_test1234567 \
--dataset ci-test
dash0 config profiles select default
dash0 config show | grep 'API URL: https://api.example.com'
dash0 config show | grep 'OTLP URL: https://ingress.example.com'
dash0 config show | grep 'Dataset: ci-test'
dash0 config show | grep 'Auth Token: \.\.\.1234567'
rm -f ~/.dash0/profiles.json ~/.dash0/activeProfile
- name: 'Test: auth-token only'
run: |
dash0 config profiles create default --auth-token auth_onlytoken7
dash0 config profiles select default
dash0 config show | grep 'Auth Token: \.\.\.ytoken7'
dash0 config show | grep 'API URL: (not set)'
dash0 config show | grep 'OTLP URL: (not set)'
dash0 config show | grep 'Dataset: default'
rm -f ~/.dash0/profiles.json ~/.dash0/activeProfile
- name: 'Test: api-url only'
run: |
dash0 config profiles create default --api-url https://api.only.example.com
dash0 config profiles select default
dash0 config show | grep 'API URL: https://api.only.example.com'
dash0 config show | grep 'OTLP URL: (not set)'
dash0 config show | grep 'Auth Token: (not set)'
dash0 config show | grep 'Dataset: default'
rm -f ~/.dash0/profiles.json ~/.dash0/activeProfile
- name: 'Test: otlp-url only'
run: |
dash0 config profiles create default --otlp-url https://ingress.only.example.com
dash0 config profiles select default
dash0 config show | grep 'OTLP URL: https://ingress.only.example.com'
dash0 config show | grep 'API URL: (not set)'
dash0 config show | grep 'Auth Token: (not set)'
dash0 config show | grep 'Dataset: default'
rm -f ~/.dash0/profiles.json ~/.dash0/activeProfile
- name: 'Test: dataset only'
run: |
dash0 config profiles create default --dataset my-dataset
dash0 config profiles select default
dash0 config show | grep 'Dataset: my-dataset'
dash0 config show | grep 'API URL: (not set)'
dash0 config show | grep 'OTLP URL: (not set)'
dash0 config show | grep 'Auth Token: (not set)'
rm -f ~/.dash0/profiles.json ~/.dash0/activeProfile
- name: 'Test: auth-token + api-url'
run: |
dash0 config profiles create default --auth-token auth_combo1token --api-url https://api.combo1.example.com
dash0 config profiles select default
dash0 config show | grep 'Auth Token: \.\.\.o1token'
dash0 config show | grep 'API URL: https://api.combo1.example.com'
dash0 config show | grep 'OTLP URL: (not set)'
dash0 config show | grep 'Dataset: default'
rm -f ~/.dash0/profiles.json ~/.dash0/activeProfile
- name: 'Test: auth-token + otlp-url'
run: |
dash0 config profiles create default --auth-token auth_combo2token --otlp-url https://ingress.combo2.example.com
dash0 config profiles select default
dash0 config show | grep 'Auth Token: \.\.\.o2token'
dash0 config show | grep 'OTLP URL: https://ingress.combo2.example.com'
dash0 config show | grep 'API URL: (not set)'
dash0 config show | grep 'Dataset: default'
test-cache:
name: 'Binary caching'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: First install (populates cache)
uses: ./.github/actions/setup
- name: Remove binary to prove cache works
run: rm ~/.dash0/bin/dash0
- name: Second install (should restore from cache)
uses: ./.github/actions/setup
- name: Verify binary was restored
run: dash0 version
test-arm64:
name: 'Install on arm64'
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Dash0 CLI
uses: ./.github/actions/setup
with:
cache: 'false'
- name: Verify binary runs on arm64
run: |
dash0 version
file ~/.dash0/bin/dash0 | grep 'aarch64\|ARM'