-
-
Notifications
You must be signed in to change notification settings - Fork 13
58 lines (56 loc) · 1.71 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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