-
Notifications
You must be signed in to change notification settings - Fork 251
108 lines (92 loc) · 2.67 KB
/
test.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Test
on: [push, pull_request]
jobs:
Test-Linux:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install libcap2-bin libtest-command-perl lcov
sudo sysctl net.ipv4.ping_group_range='0 2147483647'
- name: Build
run: |
ci/build-1-autotools.sh
ci/build-4-compile.sh
ci/test-tarball.sh
- name: Test
run: |
set -ex
PATH=`pwd`/src:$PATH
# avoid pinging internet hosts because it doesn't
# work with GitHub Actions being hosted in Azure.
prove $(ls ci/test-*.pl|grep -v internet-hosts)
ci/run-lcov.sh
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: lcov.info
flag-name: ${{ matrix.os }}
parallel: true
Test-Mac:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install dependencies
run: |
brew install automake lcov
ci/build-2-test-command.sh
ci/build-3-prepare-macos.sh
- name: Build
run: |
ci/build-4-compile.sh
- name: Test
run: |
set -ex
PATH=`pwd`/src:$PATH
export SKIP_IPV6=1
prove $(ls ci/test-*.pl|grep -v internet-hosts)
ci/run-lcov.sh
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: lcov.info
flag-name: macos
parallel: true
Coveralls-Finish:
needs: [Test-Linux, Test-Mac]
runs-on: ubuntu-latest
steps:
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
Release-Tarball:
needs: [Test-Linux, Test-Mac]
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install libcap2-bin libtest-command-perl
- name: Build
run: |
ci/build-1-autotools.sh
ci/build-4-compile.sh
ci/test-tarball.sh
- uses: actions/upload-artifact@v3
with:
name: dist
path: fping-*.tar.gz