Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 16 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
name: ci
on:
push:
branches:
- main
pull_request:
merge_group:
release:
types:
- published
workflow_call:

jobs:
build:
name: "build"
name: 'build'
runs-on: ubuntu-latest
steps:
- name: checkout
Expand All @@ -22,11 +15,11 @@ jobs:
enable_npm: true
enable_go: true
enable_cue: true
cue_version: "v0.12.0"
cue_version: 'v0.12.0'
- name: install percli
uses: perses/cli-actions/actions/install_percli@v0.2.0
with:
cli-version: "v0.51.1"
cli-version: 'v0.51.1'
- name: cache cue deps
uses: actions/cache@v4
with:
Expand All @@ -52,7 +45,7 @@ jobs:
!node_modules

lint-npm:
name: "lint-npm"
name: 'lint-npm'
runs-on: ubuntu-latest
steps:
- name: checkout
Expand All @@ -65,7 +58,7 @@ jobs:
- run: npm run lint

test-npm:
name: "test-npm"
name: 'test-npm'
runs-on: ubuntu-latest
steps:
- name: checkout
Expand All @@ -78,7 +71,7 @@ jobs:
- run: npm run test

type-check:
name: "type-check"
name: 'type-check'
runs-on: ubuntu-latest
steps:
- name: checkout
Expand All @@ -91,7 +84,7 @@ jobs:
- run: npm run type-check

lint-schemas:
name: "Validate plugin schemas"
name: 'Validate plugin schemas'
runs-on: ubuntu-latest
steps:
- name: checkout
Expand All @@ -101,11 +94,11 @@ jobs:
with:
enable_go: true
enable_cue: true
cue_version: "v0.12.0"
cue_version: 'v0.12.0'
- name: Install percli
uses: perses/cli-actions/actions/install_percli@v0.2.0
with:
cli-version: "v0.51.1"
cli-version: 'v0.51.1'
- uses: actions/cache@v4
id: cache
with:
Expand Down Expand Up @@ -133,7 +126,7 @@ jobs:
version: v2.3.0
- run: make golangci-lint
module-check:
name: "Check plugin modules"
name: 'Check plugin modules'
runs-on: ubuntu-latest
steps:
- name: checkout
Expand All @@ -143,7 +136,7 @@ jobs:
with:
enable_go: true
enable_cue: true
cue_version: "v0.12.0"
cue_version: 'v0.12.0'
- uses: actions/cache@v4
id: cache
with:
Expand All @@ -157,8 +150,8 @@ jobs:
run: git diff --exit-code -- */cue.mod

release:
name: "release"
needs: "build"
name: 'release'
needs: 'build'
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -174,8 +167,8 @@ jobs:
enable_npm: true
enable_go: true
enable_cue: true
cue_version: "v0.12.0"
nvmrc_path: "./.nvmrc"
cue_version: 'v0.12.0'
nvmrc_path: './.nvmrc'
- name: Download archive
uses: actions/download-artifact@v4
with:
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
name: doc
on:
push:
branches:
- main
- release/*
- snapshot/*
tags:
- v*
pull_request:
merge_group:
workflow_call:

jobs:
docs-fmt:
name: "Check docs format"
name: 'Check docs format'
runs-on: ubuntu-latest
steps:
- name: checkout
Expand All @@ -25,5 +17,3 @@ jobs:
run: go install github.com/bwplotka/mdox@latest
- name: check docs
run: make checkdocs


35 changes: 35 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: main
on:
push:
branches:
- main
- release/*
- snapshot/*
tags:
- v*
pull_request:
merge_group:
release:
types:
- published

jobs:
snyk:
name: 'snyk workflow'
if: ${{ startsWith(github.head_ref, 'snyk-') || startsWith(github.ref_name, 'snyk-') }}
uses: ./.github/workflows/snyk.yml
secrets: inherit

docs:
name: 'docs workflow'
needs: [snyk]
if: ${{ always() && (needs.snyk.result == 'success' || needs.snyk.result == 'skipped') }}
uses: ./.github/workflows/doc.yml
secrets: inherit

ci:
name: 'ci workflow'
needs: [snyk]
if: ${{ always() && (needs.snyk.result == 'success' || needs.snyk.result == 'skipped') }}
uses: ./.github/workflows/ci.yml
secrets: inherit
49 changes: 49 additions & 0 deletions .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: snyk
on:
workflow_call:

jobs:
lockfile-update:
name: 'regenerate lockfile'
runs-on: ubuntu-latest
permissions:
contents: write
if: startsWith(github.head_ref, 'snyk-')
outputs:
lockfile-updated: ${{ steps.lockfile-changes.outputs.has_changes }}
steps:
- name: checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.head_ref }}
fetch-depth: 2

- uses: perses/github-actions@v0.10.0
- uses: ./.github/perses-ci/actions/setup_environment
with:
enable_npm: true
- name: install dependencies
run: npm install

- name: check for lockfile changes
id: lockfile-changes
run: |
if git diff --quiet package-lock.json; then
echo "has_changes=false" >> $GITHUB_OUTPUT
else
echo "has_changes=true" >> $GITHUB_OUTPUT
fi

- name: Get last commit message
id: last-commit
run: |
echo "message=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT

- uses: stefanzweifel/git-auto-commit-action@v6
if: steps.lockfile-changes.outputs.has_changes == 'true'
with:
commit_message: '[IGNORE] ${{ steps.last-commit.outputs.message }}'
file_pattern: 'package-lock.json'
commit_options: '--no-verify --signoff --amend'
push_options: '--force-with-lease'
11 changes: 5 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tempo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"dependencies": {
"@codemirror/autocomplete": "^6.18.4",
"@lezer/highlight": "^1.2.1x",
"@grafana/lezer-traceql": "^0.0.20"
"@grafana/lezer-traceql": "^0.0.22"
},
"peerDependencies": {
"@emotion/react": "^11.7.1",
Expand Down