[FEATURE] Add external authentication handeling #12232
Workflow file for this run
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: go | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - release/* | |
| - snapshot/* | |
| tags: | |
| - v* | |
| pull_request: | |
| merge_group: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' || github.ref_name != 'main' }} | |
| jobs: | |
| checklicense: | |
| name: "check license headers" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v5 | |
| - name: check license headers | |
| run: make checklicense | |
| docs-fmt: | |
| name: "check doc format" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v5 | |
| - uses: perses/github-actions@v0.11.0 | |
| - uses: ./.github/perses-ci/actions/setup_environment | |
| with: | |
| enable_go: true | |
| - name: install mdox | |
| run: go install github.com/bwplotka/mdox@latest | |
| - name: check docs | |
| run: make checkdocs | |
| gofmt: | |
| name: "check code format" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v5 | |
| - 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: check format | |
| run: make checkformat | |
| - name: check go.mod | |
| run: make checkunused | |
| test-file: | |
| name: "tests with file DB" | |
| runs-on: ubuntu-latest | |
| services: | |
| prometheus: | |
| image: prom/prometheus | |
| ports: | |
| - '9090:9090' | |
| postgres: | |
| image: postgres:17 | |
| ports: | |
| - '5432:5432' | |
| env: | |
| POSTGRES_DB: perses | |
| POSTGRES_USER: user | |
| POSTGRES_PASSWORD: password | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v5 | |
| - 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 integration-test | |
| test-windows: | |
| name: "tests with file DB on windows" | |
| runs-on: windows-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v5 | |
| - 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" | |
| - uses: ikalnytskyi/action-setup-postgres@v8 | |
| with: | |
| username: user | |
| password: password | |
| database: perses | |
| postgres-version: 17 | |
| - name: "install prometheus" | |
| run: sh scripts/download-prometheus.sh | |
| - name: "start prometheus" | |
| run: sh scripts/run-prometheus.sh | |
| - name: test | |
| run: make integration-test | |
| test-mysql: | |
| name: "tests with mysql" | |
| runs-on: ubuntu-latest | |
| services: | |
| prometheus: | |
| image: prom/prometheus | |
| ports: | |
| - '9090:9090' | |
| mariadb: | |
| image: mariadb | |
| ports: | |
| - '3306:3306' | |
| env: | |
| MARIADB_ROOT_PASSWORD: root | |
| MARIADB_DATABASE: perses | |
| MARIADB_USER: user | |
| MARIADB_PASSWORD: password | |
| postgres: | |
| image: postgres:17 | |
| ports: | |
| - '5432:5432' | |
| env: | |
| POSTGRES_DB: perses | |
| POSTGRES_USER: user | |
| POSTGRES_PASSWORD: password | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v5 | |
| - 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 mysql-integration-test | |
| golangci: | |
| name: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v5 | |
| - 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: generate files | |
| run: make assets-compress | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v8.0.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 | |
| args: --timeout 5m | |
| validate-dev-data: | |
| name: validate CUE schemas | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v5 | |
| - uses: perses/github-actions@v0.11.0 | |
| - uses: ./.github/perses-ci/actions/setup_environment | |
| with: | |
| enable_go: true | |
| enable_cue: false | |
| - name: download plugin | |
| run: make install-default-plugins | |
| - name: validate all data from dev/data | |
| run: make validate-data | |
| validate-cue: | |
| name: "validate CUE files" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v5 | |
| - 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: validate CUE files against corresponding test files | |
| run: make validate-cue | |
| check-cue-gen: | |
| name: "check generated CUE files" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v5 | |
| - 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: generate .cue model files | |
| run: make cue-gen | |
| - name: check for changes | |
| run: | | |
| git add . | |
| if ! git diff --cached --exit-code; then | |
| echo "The generated .cue model files are not up to date. Please run 'make cue-gen' locally and commit the changes." | |
| exit 1 | |
| fi |