chore: support go1.18 and update dependencies (#708)

Here's the squash of the following patches that enable support
for go1.18 and update our dependencies.

This diff WILL need to be backported to the release/3.14 branch.

* chore: use go1.17.8

See https://github.com/ooni/probe/issues/2067

* chore: upgrade to probe-assets@v0.8.0

See https://github.com/ooni/probe/issues/2067.

* chore: update dependencies and enable go1.18

As mentioned in https://github.com/ooni/psiphon/commit/7a0d17ea91f8548dedf32daa07bcc00c1839b5b3,
the tree won't build with `go1.18` unless we say it does.

So, not only here we need to update dependencies but also we
need to explicitly say `go1.18` in the `go.mod`.

This work is part of https://github.com/ooni/probe/issues/2067.

* chore(coverage.yml): run with go1.18

This change will give us a bare minimum confidence that we're
going to build our tree using version 1.18 of golang.

See https://github.com/ooni/probe/issues/2067.

* chore: update user agent used for measuring

See https://github.com/ooni/probe/issues/2067

* chore: run `go generate ./...`

See https://github.com/ooni/probe/issues/2067

* fix(dialer_test.go): make test work with go1.17 and go1.18

1. the original test wanted the dial to fail, so ensure we're not
passing any domain name to exercise dialing not resolving;

2. match the end of the error rather than the whole error string.

Tested locally with both go1.17 and go1.18.

See https://github.com/ooni/probe-cli/pull/708#issuecomment-1096447186
This commit is contained in:
Simone Basso
2022-04-12 11:43:12 +02:00
committed by GitHub
parent 340cd826ff
commit 306d18e466
50 changed files with 855 additions and 509 deletions
+1 -1
View File
@@ -10,6 +10,6 @@ jobs:
steps:
- uses: actions/setup-go@v1
with:
go-version: "1.17.6"
go-version: "1.17.8"
- uses: actions/checkout@v2
- run: go test -race -tags shaping ./...
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/setup-go@v1
with:
go-version: "1.17.6"
go-version: "1.17.8"
- uses: actions/checkout@v2
with:
fetch-depth: 0
+3 -1
View File
@@ -11,7 +11,9 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
go: [ "1.17.6" ]
go:
- "1.17.8"
- "1.18"
steps:
- uses: actions/setup-go@v1
with:
+1 -1
View File
@@ -10,6 +10,6 @@ jobs:
steps:
- uses: actions/setup-go@v1
with:
go-version: "1.17.6"
go-version: "1.17.8"
- uses: actions/checkout@v2
- run: go generate ./...
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/setup-go@v1
with:
go-version: "1.17.6"
go-version: "1.17.8"
- uses: actions/checkout@v2
with:
fetch-depth: 0
+1 -1
View File
@@ -10,7 +10,7 @@ jobs:
steps:
- uses: actions/setup-go@v1
with:
go-version: "1.17.6"
go-version: "1.17.8"
- uses: actions/checkout@v2
- run: go build -v ./internal/cmd/jafar
- run: sudo ./testjafar.bash
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/setup-go@v1
with:
go-version: "1.17.6"
go-version: "1.17.8"
- uses: actions/checkout@v2
with:
fetch-depth: 0
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-go@v1
with:
go-version: "1.17.6"
go-version: "1.17.8"
- uses: actions/checkout@v2
with:
+1 -1
View File
@@ -10,7 +10,7 @@ jobs:
runs-on: "${{ matrix.os }}"
strategy:
matrix:
go: [ "1.17.6" ]
go: [ "1.17.8" ]
os: [ "ubuntu-20.04", "windows-2019", "macos-10.15" ]
steps:
- uses: actions/setup-go@v1
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: "1.17.6"
go-version: "1.17.8"
- name: build oohelperd binary
run: GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o ./CLI/oohelperd-linux-amd64 -v -tags netgo -ldflags="-s -w -extldflags -static" ./internal/cmd/oohelperd
+1 -1
View File
@@ -10,6 +10,6 @@ jobs:
steps:
- uses: actions/setup-go@v1
with:
go-version: "1.17.6"
go-version: "1.17.8"
- uses: actions/checkout@v2
- run: ./QA/rundocker.bash "fbmessenger"
+1 -1
View File
@@ -10,6 +10,6 @@ jobs:
steps:
- uses: actions/setup-go@v1
with:
go-version: "1.17.6"
go-version: "1.17.8"
- uses: actions/checkout@v2
- run: ./QA/rundocker.bash "hhfm"
+1 -1
View File
@@ -10,6 +10,6 @@ jobs:
steps:
- uses: actions/setup-go@v1
with:
go-version: "1.17.6"
go-version: "1.17.8"
- uses: actions/checkout@v2
- run: ./QA/rundocker.bash "hirl"
+1 -1
View File
@@ -10,6 +10,6 @@ jobs:
steps:
- uses: actions/setup-go@v1
with:
go-version: "1.17.6"
go-version: "1.17.8"
- uses: actions/checkout@v2
- run: ./QA/rundocker.bash "telegram"
+1 -1
View File
@@ -10,6 +10,6 @@ jobs:
steps:
- uses: actions/setup-go@v1
with:
go-version: "1.17.6"
go-version: "1.17.8"
- uses: actions/checkout@v2
- run: ./QA/rundocker.bash "webconnectivity"
+1 -1
View File
@@ -10,6 +10,6 @@ jobs:
steps:
- uses: actions/setup-go@v1
with:
go-version: "1.17.6"
go-version: "1.17.8"
- uses: actions/checkout@v2
- run: ./QA/rundocker.bash "whatsapp"
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17.6
go-version: 1.17.8
- name: Generate release tarball
run: |
VERSION=${GITHUB_REF_NAME#v}
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/setup-go@v1
with:
go-version: "1.17.6"
go-version: "1.17.8"
- uses: actions/checkout@v2
with:
fetch-depth: 0