Skip to content

github-actions: run on windows #8

github-actions: run on windows

github-actions: run on windows #8

Workflow file for this run

name: ci
on:
push:
pull_request:
merge_group:
# limit the access of the generated GITHUB_TOKEN
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: install mage
run: go install github.com/magefile/mage
- run: |
mage -debug check
go vet ./...
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: install mage
run: go install github.com/magefile/mage
- name: install protoc
run: |
curl -sSfL -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip
mkdir -p $GITHUB_WORKSPACE/.protoc
unzip -o protoc.zip -d $GITHUB_WORKSPACE/.protoc
echo "$GITHUB_WORKSPACE/.protoc/bin" >> $GITHUB_PATH
- run: mage -debug update
test:
strategy:
matrix:
os: ['macos-latest', 'ubuntu-latest']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- run: go test -v -race ./...
test-windows:
runs-on: 'windows-latest'
steps:
- uses: actions/checkout@v4
# See https://github.com/actions/setup-go/pull/515
- uses: antontroshin/setup-go@bda02de8887c9946189f81e7e59512914aeb9ea4
with:
go-version-file: go.mod
cache: true
- run: go test -v -race ./...