added workflow #18
This file contains hidden or 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: | |
| push: | |
| pull_request: | |
| merge_group: | |
| # limit the access of the generated GITHUB_TOKEN | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| strategy: | |
| matrix: | |
| os: [windows-2022, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| 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 | |
| - name: install mage | |
| run: go install github.com/magefile/mage | |
| - run: | | |
| mage -debug check | |
| go vet ./... | |
| update: | |
| strategy: | |
| matrix: | |
| os: [ windows-2022, windows-latest ] | |
| runs-on: ${{ matrix.os }} | |
| 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 | |
| - 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 | |
| mage -debug update | |
| go test -v -race ./... | |
| # - run: mage -debug update | |
| # - run: go test -v -race ./... |