github.com/tumi8/quic-go@v0.37.4-tum/.github/workflows/unit.yml (about)

     1  on: [push, pull_request]
     2  
     3  
     4  jobs:
     5    unit:
     6      strategy:
     7        fail-fast: false
     8        matrix:
     9          os: [ "ubuntu", "windows", "macos" ]
    10          go: [ "1.20.x", "1.21.0-rc.3" ]
    11      runs-on: ${{ fromJSON(vars[format('UNIT_RUNNER_{0}', matrix.os)] || format('"{0}-latest"', matrix.os)) }}
    12      name: Unit tests (${{ matrix.os}}, Go ${{ matrix.go }})
    13      steps:
    14        - uses: actions/checkout@v3
    15        - uses: actions/setup-go@v3
    16          with:
    17            go-version: ${{ matrix.go }}
    18        - run: go version
    19        - name: Run tests
    20          env:
    21            TIMESCALE_FACTOR: 10
    22          run: go run github.com/onsi/ginkgo/v2/ginkgo -r -v -cover -randomize-all -randomize-suites -trace -skip-package integrationtests
    23        - name: Run tests as root
    24          if: ${{ matrix.os == 'ubuntu' }}
    25          env:
    26            TIMESCALE_FACTOR: 10
    27            FILE: sys_conn_helper_linux_test.go
    28          run: |
    29            test -f $FILE # make sure the file actually exists
    30            go run github.com/onsi/ginkgo/v2/ginkgo build -cover -tags root .
    31            sudo ./quic-go.test -ginkgo.v -ginkgo.trace -ginkgo.randomize-all -ginkgo.focus-file=$FILE -test.coverprofile coverage-root.txt
    32            rm quic-go.test
    33        - name: Run tests (32 bit)
    34          if: ${{ matrix.os != 'macos' }} # can't run 32 bit tests on OSX.
    35          env:
    36            TIMESCALE_FACTOR: 10
    37            GOARCH: 386
    38          run: go run github.com/onsi/ginkgo/v2/ginkgo -r -v -cover -coverprofile coverage.txt -output-dir . -randomize-all -randomize-suites -trace -skip-package integrationtests
    39        - name: Run tests with race detector
    40          if: ${{ matrix.os == 'ubuntu' }} # speed things up. Windows and OSX VMs are slow
    41          env:
    42            TIMESCALE_FACTOR: 20
    43          run: go run github.com/onsi/ginkgo/v2/ginkgo -r -v -race -randomize-all -randomize-suites -trace -skip-package integrationtests
    44        - name: Upload coverage to Codecov
    45          uses: codecov/codecov-action@v3
    46          with:
    47            files: coverage.txt,coverage-root.txt
    48            env_vars: OS=${{ matrix.os }}, GO=${{ matrix.go }}