ooni-probe-cli/.github/workflows/netxlite.yml
Simone Basso 9e38ee5135
feat: build ooniprobe for armv6 (#904)
Part of https://github.com/ooni/probe/issues/1753.

While there, introduce a rule by which, if the branch is named `fullbuild` we run all possible builds. It helps to test all the builds without creating a release branch. Because release branches are protected, they cannot be deleted easily. On the contrary, the `fullbuild` branch can easily be disposed of.
2022-08-29 17:33:42 +02:00

40 lines
1.1 KiB
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/**"
- "fullbuild"
jobs:
test_netxlite_package:
runs-on: "${{ matrix.os }}"
strategy:
matrix:
os: [ "ubuntu-20.04", "windows-2019", "macos-10.15" ]
steps:
- uses: actions/checkout@v2
- name: Get GOVERSION content
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)
shell: bash
- uses: magnetikonline/action-golang-cache@v2
with:
go-version: "${{ steps.goversion.outputs.version }}"
cache-key-suffix: "-coverage-${{ steps.goversion.outputs.version }}"
# 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