fix: derive managed app ids from app names and add KDE cache refresh #112
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Check gofmt | |
| run: | | |
| unformatted="$(gofmt -l $(git ls-files "*.go"))" | |
| if [ -n "$unformatted" ]; then | |
| printf "Go files are not gofmt-formatted:\n%s\n" "$unformatted" | |
| exit 1 | |
| fi | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Run tests | |
| run: go test ./... | |
| - name: Check coverage | |
| run: | | |
| go test ./... -covermode=atomic -coverprofile=coverage.out | |
| total="$(go tool cover -func=coverage.out | awk '/^total:/ { gsub(/%/, "", $3); print $3 }')" | |
| minimum="70.0" | |
| awk -v total="$total" -v minimum="$minimum" 'BEGIN { | |
| if (total + 0 < minimum + 0) { | |
| printf "coverage %.1f%% is below required %.1f%%\n", total, minimum | |
| exit 1 | |
| } | |
| printf "coverage %.1f%% meets required %.1f%%\n", total, minimum | |
| }' | |
| { | |
| printf "## Coverage\n\n" | |
| printf "Total statement coverage: **%s%%**\n\n" "$total" | |
| printf "Required minimum: **%s%%**\n" "$minimum" | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| - name: Upload coverage profile | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-profile | |
| path: coverage.out | |
| if-no-files-found: error | |
| race: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Run race tests | |
| run: go test -race ./... | |
| vet: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Run vet | |
| run: go vet ./... | |
| vulnerability: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Install govulncheck | |
| run: go install golang.org/x/vuln/cmd/govulncheck@latest | |
| - name: Run govulncheck | |
| run: | | |
| "$(go env GOPATH)/bin/govulncheck" ./... | |
| goreleaser: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Check GoReleaser config | |
| uses: goreleaser/goreleaser-action@v7 | |
| with: | |
| distribution: goreleaser | |
| version: "~> v2" | |
| args: check | |
| shellcheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install ShellCheck | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y shellcheck | |
| - name: Run ShellCheck | |
| run: shellcheck scripts/*.sh |