Bump golang.org/x/net from 0.41.0 to 0.42.0 #768
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: Tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
tests: | |
name: Test code | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: [ 1.22.x, 1.23.x, 1.24.x, tip ] | |
steps: | |
- name: Set up Go stable | |
if: matrix.go != 'tip' | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Set up Go tip | |
if: matrix.go == 'tip' | |
run: | | |
curl -o go.tar.gz -L \ | |
https://github.com/AlekSi/golang-tip/releases/download/tip/master.linux-amd64.tar.gz | |
sudo tar -C /usr/local -xzf go.tar.gz | |
sudo ln -s /usr/local/go/bin/* /usr/local/bin/ | |
/usr/local/bin/go version | |
echo "PATH=$HOME/go/bin:$HOME/sdk/gotip/bin/:$PATH" >> $GITHUB_ENV | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Ensure go.sum exists | |
run: go mod tidy | |
- name: Checkout to the latest tag | |
run: | | |
# Fetch all tags | |
git fetch --depth=1 --tags | |
# Get the latest tag | |
VERS=$(git tag -l | sort -Vr | head -n1) | |
# Fetch everything to the latest tag | |
git fetch --shallow-since=$(git log $VERS -1 --format=%at) | |
if: ${{ github.event_name == 'push' }} # only when built from master | |
- name: Build project | |
run: make | |
- name: Test | |
run: make test | |
env: | |
CGO_ENABLED: 1 | |
- name: Govulncheck | |
if: ${{ matrix.go == '1.24.x' }} # only do govulncheck when built with latest stable go | |
id: govulncheck | |
uses: golang/govulncheck-action@v1 | |
with: | |
go-version-input: ${{ matrix.go }} | |
check-latest: true | |
go-package: ./... | |
- name: Check Docker images | |
run: | | |
make image | |
- name: Check packaging | |
run: | | |
go install github.com/goreleaser/nfpm/v2/cmd/[email protected] | |
make DEVEL=1 nfpm-deb nfpm-rpm | |
make sum-files | |
- name: Upload Artifact | |
if: ${{ matrix.go == '1.24.x' }} # only upload artifact when built with latest stable go | |
id: artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: packages-${{ matrix.go }} | |
retention-days: 3 | |
path: | | |
*.deb | |
*.rpm | |
sha256sum | |
md5sum | |
- name: Push packages to the autobuilds repo | |
if: ${{ github.event_name == 'push' && matrix.go == '1.24.x' }} # only when built from master with latest stable go | |
run: make DEVEL=1 packagecloud-autobuilds | |
env: | |
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} |