Add a single dev server for all plugins #253
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: ci | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
merge_group: | |
release: | |
types: | |
- published | |
jobs: | |
get-schemas-deps: | |
name: 'Get dependencies for plugin schemas' | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- uses: perses/github-actions@v0.9.0 | |
- uses: ./.github/perses-ci/actions/setup_environment | |
with: | |
enable_go: true | |
- name: Install percli | |
uses: perses/cli-actions/actions/install_percli@v0.1.0 | |
with: | |
cli_version: 'v0.50.1' | |
- run: go run ./scripts/get-schemas-deps/get-schemas-deps.go | |
- name: store plugin schema dependencies | |
uses: actions/upload-artifact@v4 | |
with: | |
name: plugins-schema-deps | |
path: | | |
*/cue.mod/pkg | |
build: | |
name: 'build' | |
needs: 'get-schemas-deps' | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- uses: perses/github-actions@v0.8.0 | |
- uses: ./.github/perses-ci/actions/setup_environment | |
with: | |
enable_npm: true | |
enable_go: true | |
- name: retrieve plugin schema dependencies | |
uses: actions/download-artifact@v4 | |
with: | |
name: plugins-schema-deps | |
- run: npm ci | |
- run: npm run build | |
- run: go run ./scripts/build-archive/build-archive.go | |
- name: store plugin archives | |
uses: actions/upload-artifact@v4 | |
with: | |
name: archives | |
path: | | |
**/*.tar.gz | |
!node_modules | |
lint: | |
name: 'lint' | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- uses: perses/github-actions@v0.8.0 | |
- uses: ./.github/perses-ci/actions/setup_environment | |
with: | |
enable_npm: true | |
- run: npm ci | |
- run: npm run lint | |
test: | |
name: 'test' | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- uses: perses/github-actions@v0.8.0 | |
- uses: ./.github/perses-ci/actions/setup_environment | |
with: | |
enable_npm: true | |
- run: npm ci | |
- run: npm run test | |
type-check: | |
name: 'type-check' | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- uses: perses/github-actions@v0.8.0 | |
- uses: ./.github/perses-ci/actions/setup_environment | |
with: | |
enable_npm: true | |
- run: npm ci | |
- run: npm run type-check | |
validate-schemas: | |
name: 'Validate plugin schemas' | |
needs: 'get-schemas-deps' | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- uses: perses/github-actions@v0.8.0 | |
- uses: ./.github/perses-ci/actions/setup_environment | |
with: | |
enable_go: true | |
cue_version: 'v0.11.0' | |
enable_cue: true | |
- name: retrieve plugin schema dependencies | |
uses: actions/download-artifact@v4 | |
with: | |
name: plugins-schema-deps | |
- run: go run ./scripts/validate-schemas/validate-schemas.go | |
release: | |
name: 'release' | |
needs: 'build' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
if: ${{ github.event.release.tag_name }} | |
env: | |
GITHUB_TOKEN: ${{ github.TOKEN }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- uses: perses/github-actions@v0.8.0 | |
- uses: ./.github/perses-ci/actions/setup_environment | |
with: | |
enable_npm: false | |
enable_go: true | |
- name: Download archive | |
uses: actions/download-artifact@v4 | |
with: | |
name: archives | |
- run: go run ./scripts/upload-archive/upload-archive.go -tag=${{ github.event.release.tag_name }} |