feat: cleanup workflows #1142
This file contains 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: Unit tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
permissions: | |
contents: read # Erforderlich, um den Code auszuchecken | |
jobs: | |
test-go: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: [ '1.23', '1.24' ] | |
name: Go ${{ matrix.go }} tests | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Go | |
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 | |
with: | |
go-version: ${{ matrix.go }} | |
cache: true # Aktiviert Caching für Go-Module | |
- name: Cache Go modules | |
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 | |
with: | |
path: ~/go/pkg/mod | |
key: go-mod-${{ runner.os }}-${{ matrix.go }}-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
go-mod-${{ runner.os }}-${{ matrix.go }}- | |
- name: Run tests | |
run: go test -v ./... |