CI: remove go test cache write/delete (#104064)

remove go test cache write/save/delete
pull/104199/head
Kevin Minehart 3 months ago committed by GitHub
parent e45f2d0a18
commit 79eb1b0033
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 48
      .github/workflows/backend-unit-tests.yml

@ -36,34 +36,10 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Restore GOCACHE
uses: actions/cache/restore@v4
with:
key: go-test-cache-${{ github.ref_name }}
restore-keys: |
go-test-cache-${{ github.base_ref }}
go-test-cache-main
path: /home/runner/.cache/go-build
- name: Generate Go code
run: make gen-go
- name: Run unit tests
run: make test-go-unit
- name: "Generate token"
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
- name: Clear GOCACHE
run: gh cache delete go-test-cache-${{ github.ref_name }}
continue-on-error: true
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: Save GOCACHE
uses: actions/cache/save@v4
with:
key: go-test-cache-${{ github.ref_name }}
path: /home/runner/.cache/go-build
grafana-enterprise:
# Run this workflow for non-PR events (like pushes to `main` or `release-*`) OR for internal PRs (PRs not from forks)
@ -77,14 +53,6 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Restore GOCACHE
uses: actions/cache/restore@v4
with:
key: go-test-cache-${{ github.ref_name }}-enterprise
restore-keys: |
go-test-cache-${{ github.base_ref }}-enterprise
go-test-cache-main-enterprise
path: /home/runner/.cache/go-build
- name: Setup Enterprise
uses: ./.github/actions/setup-enterprise
with:
@ -93,19 +61,3 @@ jobs:
run: make gen-go
- name: Run unit tests
run: make test-go-unit
- name: "Generate token"
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
- name: Clear GOCACHE
run: gh cache delete go-test-cache-${{ github.ref_name }}-enterprise
continue-on-error: true
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: Save GOCACHE
uses: actions/cache/save@v4
with:
key: go-test-cache-${{ github.ref_name }}-enterprise
path: /home/runner/.cache/go-build

Loading…
Cancel
Save