upgrade goreleaser #191
This file contains 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: | |
pull_request: | |
branches: [master] | |
push: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
go: ["1.21"] | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
name: ${{ matrix.os }} Go ${{ matrix.go }} Tests | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
cache: true | |
- name: Install dependencies | |
run: go get . | |
- name: Run tests | |
run: go test ./... -v | |
- name: Build | |
run: go build -o bin/ | |
- name: Test windows cmd | |
if: matrix.os == 'windows-latest' | |
shell: cmd | |
run: | | |
bin\globalping-cli.exe ping cdn.jsdelivr.net | |
bin\globalping-cli.exe ping cdn.jsdelivr.net from @-1 | |
- name: Test windows powershell | |
if: matrix.os == 'windows-latest' | |
shell: powershell | |
run: | | |
bin\globalping-cli.exe ping cdn.jsdelivr.net | |
bin\globalping-cli.exe ping cdn.jsdelivr.net from '@-1' | |
- name: Test windows bash | |
if: matrix.os == 'windows-latest' | |
shell: bash | |
run: | | |
./bin/globalping-cli.exe ping cdn.jsdelivr.net | |
./bin/globalping-cli.exe ping cdn.jsdelivr.net from @-1 | |
- name: Test macOS | |
if: matrix.os == 'macOS-latest' | |
run: | | |
./bin/globalping-cli ping cdn.jsdelivr.net | |
./bin/globalping-cli ping cdn.jsdelivr.net from @-1 | |
- name: Test ubuntu | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
./bin/globalping-cli ping cdn.jsdelivr.net | |
./bin/globalping-cli ping cdn.jsdelivr.net from @-1 |