Remove workarounds for untested Ubuntu versions #21
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 Testing | |
on: | |
- push | |
- pull_request | |
permissions: | |
contents: read | |
jobs: | |
test: | |
permissions: | |
checks: write # for coverallsapp/github-action to create a new check based on the results | |
contents: read # for actions/checkout to fetch code | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
go-version: | |
- "1.22.3" | |
- "1" | |
steps: | |
- name: Checkout Gophercloud | |
uses: actions/checkout@v4 | |
- name: Setup Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Setup environment | |
run: | | |
# Changing into a different directory to avoid polluting go.sum with "go get" | |
cd "$(mktemp -d)" | |
go mod init unit_tests | |
go install github.com/wadey/gocovmerge@master | |
- name: Run unit tests | |
run: | | |
make unit | |
make coverage | |
- name: Check coverage | |
uses: coverallsapp/github-action@v2 | |
with: | |
file: cover.out | |
flag-name: Go-${{ matrix.go-version }} | |
parallel: true | |
finish: | |
permissions: | |
checks: write # for coverallsapp/github-action to create a new check based on the results | |
needs: test | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Store coverage results | |
uses: coverallsapp/github-action@v2 | |
with: | |
parallel-finished: true | |
carryforward: Go-${{ join(matrix.go-version.*, '-') }} |