[ignore] community plugins are now in a dedicated folder #2274
This file contains hidden or 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: | |
| build: | |
| name: "build" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - uses: perses/github-actions@v0.11.0 | |
| - uses: ./.github/perses-ci/actions/setup_environment | |
| with: | |
| enable_npm: true | |
| enable_go: true | |
| enable_cue: true | |
| cue_version: "v0.14.0" | |
| - name: install percli | |
| uses: perses/cli-actions/actions/install_percli@v0.2.0 | |
| with: | |
| cli-version: "v0.53.0-beta.1" | |
| - name: cache cue deps | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/cue | |
| key: ${{ runner.os }}-cue-${{ hashFiles('**/module.cue') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cue- | |
| - name: install dependencies | |
| run: npm ci | |
| - name: build plugin | |
| if: github.event_name == 'release' | |
| run: go run ./scripts/build-plugins/build-plugins.go --tag=${{ github.event.release.tag_name }} | |
| - name: build all plugins | |
| if: github.event_name != 'release' | |
| run: go run ./scripts/build-plugins/build-plugins.go | |
| - name: store plugin archives | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: archives | |
| path: | | |
| **/*.tar.gz | |
| **/dist | |
| !node_modules | |
| lint-npm: | |
| name: "lint-npm" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - uses: perses/github-actions@v0.11.0 | |
| - uses: ./.github/perses-ci/actions/setup_environment | |
| with: | |
| enable_npm: true | |
| - run: npm ci | |
| - run: npm run lint | |
| test-go: | |
| name: "test-go" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - uses: perses/github-actions@v0.11.0 | |
| - uses: ./.github/perses-ci/actions/setup_environment | |
| with: | |
| enable_go: true | |
| enable_cue: true # needed for DaC CLI commands unit tests | |
| cue_version: "v0.14.0" | |
| - name: test | |
| run: make test | |
| test-npm: | |
| name: "test-npm" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - uses: perses/github-actions@v0.11.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@v6 | |
| - uses: perses/github-actions@v0.11.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" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - uses: perses/github-actions@v0.11.0 | |
| - uses: ./.github/perses-ci/actions/setup_environment | |
| with: | |
| enable_go: true | |
| enable_cue: true | |
| cue_version: "v0.14.0" | |
| - name: Install percli | |
| uses: perses/cli-actions/actions/install_percli@v0.2.0 | |
| with: | |
| cli-version: "v0.53.0-beta.1" | |
| - uses: actions/cache@v5 | |
| id: cache | |
| with: | |
| path: ~/.cache/cue | |
| key: ${{ runner.os }}-cue-${{ hashFiles('**/module.cue') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cue- | |
| - run: make lint-plugins | |
| - run: make test-schemas-plugins | |
| golangci: | |
| name: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - uses: perses/github-actions@v0.11.0 | |
| - uses: ./.github/perses-ci/actions/setup_environment | |
| with: | |
| enable_go: true | |
| enable_go_cache: false | |
| enable_npm: false | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v9.2.0 | |
| with: | |
| # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | |
| version: v2.4.0 | |
| - run: make golangci-lint | |
| module-check: | |
| name: "Check plugin modules" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - uses: perses/github-actions@v0.11.0 | |
| - uses: ./.github/perses-ci/actions/setup_environment | |
| with: | |
| enable_go: true | |
| enable_cue: true | |
| cue_version: "v0.14.0" | |
| - uses: actions/cache@v5 | |
| id: cache | |
| with: | |
| path: ~/.cache/cue | |
| key: ${{ runner.os }}-cue-${{ hashFiles('**/module.cue') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cue- | |
| - name: Tidy modules | |
| run: make tidy-modules | |
| - name: Check for unused/missing packages in all cue.mod | |
| run: git diff --exit-code -- */cue.mod | |
| 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@v6 | |
| - uses: perses/github-actions@v0.11.0 | |
| - uses: ./.github/perses-ci/actions/setup_environment | |
| with: | |
| enable_npm: true | |
| enable_go: true | |
| enable_cue: true | |
| cue_version: "v0.14.0" | |
| nvmrc_path: "./.nvmrc" | |
| - name: Download archive | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: archives | |
| - run: go run ./scripts/upload-archive/upload-archive.go -tag=${{ github.event.release.tag_name }} | |
| - name: Publish CUE module | |
| run: go run ./scripts/cue-publish/cue-publish.go -tag=${{ github.event.release.tag_name }} -token=${{ secrets.CUE_REG_TOKEN }} | |
| - name: Publish npm package | |
| run: go run ./scripts/npm-publish/npm-publish.go -tag=${{ github.event.release.tag_name }} | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |