[BUGFIX] Refresh RBAC cache when adding or removing users. #9595
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@v4 | |
| - name: check license headers | |
| run: make checklicense | |
| docs-fmt: | |
| name: "check doc format" | |
| 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 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@v4 | |
| - uses: perses/github-actions@v0.9.0 | |
| - uses: ./.github/perses-ci/actions/setup_environment | |
| with: | |
| enable_go: true | |
| enable_cue: true | |
| cue_version: "v0.12.0" | |
| - name: check format | |
| run: make checkformat | |
| - name: check go.mod | |
| run: make checkunused | |
| test: | |
| name: "tests with file DB" | |
| runs-on: ubuntu-latest | |
| services: | |
| prometheus: | |
| image: prom/prometheus | |
| ports: | |
| - '9090:9090' | |
| 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 | |
| enable_cue: true # needed for DaC CLI commands unit tests | |
| cue_version: "v0.12.0" | |
| - name: generate files | |
| run: make generate | |
| - 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 | |
| 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 | |
| enable_cue: true # needed for DaC CLI commands unit tests | |
| cue_version: "v0.12.0" | |
| - name: generate files | |
| run: make generate | |
| - name: test | |
| run: make mysql-integration-test | |
| golangci: | |
| name: lint | |
| 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 | |
| enable_go_cache: false | |
| enable_npm: false | |
| - name: generate files | |
| run: make assets-compress | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v6.5.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: v1.62.2 | |
| args: --timeout 5m | |
| cue-def: | |
| name: cue | |
| 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 | |
| enable_cue: true | |
| cue_version: "v0.12.0" | |
| - name: check cue schema | |
| run: make cue-def | |
| - name: download plugin | |
| run: make install-default-plugins | |
| - name: test cue schema | |
| run: make cue-test | |
| check-cue-gen: | |
| name: "check cue gen files" | |
| 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 | |
| enable_cue: true | |
| cue_version: "v0.12.0" | |
| - name: generate cue files | |
| run: make cue-gen | |
| - name: check for changes | |
| run: | | |
| git add . | |
| if ! git diff --cached --exit-code; then | |
| echo "CUE generated files are not up to date. Please run 'make cue-gen' and commit the changes." | |
| exit 1 | |
| fi |