这是indexloc提供的服务,不要输入任何密码
Skip to content

tags

tags #621

Workflow file for this run

on:
push:
branches:
- master
name: CI
permissions: read-all
jobs:
test:
env:
GITHUB_API: ${{ secrets.PAT }}
## We want to define a strategy for our job
strategy:
## this will contain a matrix of all the combinations
## we wish to test again:
matrix:
go-version: [ 1.24.x ]
platform: [ ubuntu-latest, macos-latest, windows-latest ]
## Defines the platform for each test run
runs-on: ${{ matrix.platform }}
## the steps that will be run through for each version and platform
## combination
steps:
## sets up go based on the version
- name: Install Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: ${{ matrix.go-version }}
## checks out our code locally, so we can work with the files
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
## runs go test ./...
- name: Build
run: go build ./...
## runs go test ./...
- name: Test
run: go test ./... -coverprofile=./cover.out
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@4650159d642e33fdc30954ca22638caf0df6cac8 # v5.4.3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}