ooni-probe-cli/.github/workflows/netxlite.yml
Simone Basso 5371c7f486
fix(workflows): elevate GITHUB_TOKEN permissions when needed (#822)
I am not 100% sure I was able to fix all the cases in which we
need higher permissions than the strict default.

At least, I tried.

It may be reasonable to make an interim release to check whether I
successfully fixed all the cases.

Ref issue: https://github.com/ooni/probe/issues/2154
2022-07-01 12:11:32 +02:00

33 lines
977 B
YAML

# Runs unit and integration tests for our fundamental networking library.
name: netxlite
on:
# Because we link libc explicitly for getaddrinfo, we SHOULD run
# these checks for every PR to ensure we still compile.
pull_request:
push:
branches:
- "master"
- "release/**"
jobs:
test_netxlite_package:
runs-on: "${{ matrix.os }}"
strategy:
matrix:
go: [ "1.18.3" ]
os: [ "ubuntu-20.04", "windows-2019", "macos-10.15" ]
steps:
- uses: magnetikonline/action-golang-cache@v2
with:
go-version: "${{ matrix.go }}"
cache-key-suffix: "-coverage-${{ matrix.go }}"
- uses: actions/checkout@v2
# The first test compiles and links against libc and uses getaddrinfo
- run: go test -race ./internal/netxlite/...
# The second test instead uses netgo (we can't use -race with CGO_ENABLED=0)
- run: go test ./internal/netxlite/...
env:
CGO_ENABLED: 0