Skip to content

misc: improve client caching (#118) #9

misc: improve client caching (#118)

misc: improve client caching (#118) #9

Workflow file for this run

name: Tests
on:
pull_request:
branches: [master]
push:
branches: [master]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
go: ["1.22"]
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 -timeout 30s
- 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