Skip to content

Commit

Permalink
.github/workflows: replace deprecated 'axiom dataset info' with 'axio…
Browse files Browse the repository at this point in the history
…m query' to verify test
  • Loading branch information
lukasmalkmus committed Jan 27, 2025
1 parent 0720dba commit db5b3e0
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/test_examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,25 @@ jobs:
include:
- example: apex
verify: |
axiom dataset info $AXIOM_DATASET -f=json | jq -e 'any( .numEvents ; . == 3 )'
axiom query -f=json "['$AXIOM_DATASET'] | count" | jq -e '. == 3'
- example: ingestevent
verify: |
axiom dataset info $AXIOM_DATASET -f=json | jq -e 'any( .numEvents ; . == 2 )'
axiom query -f=json "['$AXIOM_DATASET'] | count" | jq -e '. == 2'
- example: ingestfile
setup: |
echo '[{"timestamp":"1668773301","mood":"hyped","msg":"This is awesome!"}]' >> logs.json
echo "NOW=$(date +%s)" >> $GITHUB_ENV
echo '[{"timestamp":"'$NOW'","mood":"hyped","msg":"This is awesome!"}]' >> logs.json
verify: |
axiom dataset info $AXIOM_DATASET -f=json | jq -e 'any( .numEvents ; . == 1 )'
axiom query -f=json "['$AXIOM_DATASET'] | count" | jq -e '. == 1'
- example: logrus
verify: |
axiom dataset info $AXIOM_DATASET -f=json | jq -e 'any( .numEvents ; . == 3 )'
axiom query -f=json "['$AXIOM_DATASET'] | count" | jq -e '. == 3'
- example: otelinstrument
verify: |
axiom dataset info $AXIOM_DATASET -f=json | jq -e 'any( .numEvents ; . >= 1 )'
axiom query -f=json "['$AXIOM_DATASET'] | count" | jq -e '. >= 1'
- example: oteltraces
verify: |
axiom dataset info $AXIOM_DATASET -f=json | jq -e 'any( .numEvents ; . == 2 )'
axiom query -f=json "['$AXIOM_DATASET'] | count" | jq -e '. == 2'
- example: query
setup: |
echo '[{"mood":"hyped","msg":"This is awesome!"}]' >> logs.json
Expand All @@ -76,13 +77,13 @@ jobs:
sleep 5
- example: slog
verify: |
axiom dataset info $AXIOM_DATASET -f=json | jq -e 'any( .numEvents ; . == 3 )'
axiom query -f=json "['$AXIOM_DATASET'] | count" | jq -e '. == 3'
- example: zap
verify: |
axiom dataset info $AXIOM_DATASET -f=json | jq -e 'any( .numEvents ; . == 3 )'
axiom query -f=json "['$AXIOM_DATASET'] | count" | jq -e '. == 3'
- example: zerolog
verify: |
axiom dataset info $AXIOM_DATASET -f=json | jq -e 'any( .numEvents ; . == 3 )'
axiom query -f=json "['$AXIOM_DATASET'] | count" | jq -e '. == 3'
env:
AXIOM_URL: ${{ secrets.TESTING_STAGING_API_URL }}
AXIOM_TOKEN: ${{ secrets.TESTING_STAGING_TOKEN }}
Expand Down

0 comments on commit db5b3e0

Please sign in to comment.