CI check latest go version (#4202) #12587
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: windows | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: ["v*"] | |
| pull_request: | |
| # Prevent writing to the repository using the CI token. | |
| # Ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions | |
| permissions: read-all | |
| jobs: | |
| test: | |
| env: | |
| DOWNLOAD_CACHE: 'd:\downloadcache' | |
| # Improve performance by using D: drive. | |
| # C: seems to be really slow, especially for cache restores. | |
| GOPATH: 'd:\go\path' | |
| GOCACHE: 'd:\go\cache' | |
| GOMODCACHE: 'd:\go\modcache' | |
| runs-on: windows-latest | |
| steps: | |
| - name: support-longpaths | |
| run: git config --system core.longpaths true | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - name: setup-go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25.x" | |
| check-latest: true | |
| cache: true | |
| - name: windows-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ env.DOWNLOAD_CACHE }} | |
| key: ${{ runner.os }}-buf-windows-${{ hashFiles('windows/**') }} | |
| restore-keys: | | |
| ${{ runner.os }}-buf-windows- | |
| - name: test | |
| shell: bash | |
| run: ./etc/windows/test.bash |