all: migrate deps to codeberg #319
Workflow file for this run
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: CI | |
on: | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
name: Build | |
strategy: | |
matrix: | |
go-version: [1.24.x, 1.23.x] | |
platform: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.platform }} | |
env: | |
GO111MODULE: on | |
GOPATH: ${{ github.workspace }} | |
defaults: | |
run: | |
working-directory: ${{ env.GOPATH }}/src/gonum.org/v1/plot | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
path: ${{ env.GOPATH }}/src/gonum.org/v1/plot | |
fetch-depth: 1 | |
- name: Cache-Go | |
uses: actions/cache@v4 | |
with: | |
# In order: | |
# * Module download cache | |
# * Build cache (Linux) | |
# * Build cache (Mac) | |
# * Build cache (Windows) | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
~/Library/Caches/go-build | |
'%LocalAppData%\go-build' | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
- name: Check copyrights+formatting | |
run: | | |
# Required for format check. | |
go install golang.org/x/tools/cmd/goimports@latest | |
# Required for imports check. | |
go install gonum.org/v1/tools/cmd/check-imports@latest | |
# Required for copyright header check. | |
go install gonum.org/v1/tools/cmd/check-copyright@latest | |
./.ci/check-copyright.sh | |
./.ci/check-formatting.sh | |
- name: Build | |
run: | | |
go install -v ./... | |
- name: Test Linux | |
if: matrix.platform == 'ubuntu-latest' | |
run: | | |
go test -v ./... | |
./.ci/check-imports.sh | |
./.ci/test-coverage.sh | |
- name: Test Windows | |
if: matrix.platform == 'windows-latest' | |
run: | | |
go test -v ./... | |
- name: Test Darwin | |
if: matrix.platform == 'macos-latest' | |
run: | | |
go test -v ./... | |
- name: Upload-Coverage | |
if: matrix.platform == 'ubuntu-latest' | |
uses: codecov/codecov-action@v2 |