mirror of
https://github.com/strukturag/nextcloud-spreed-signaling.git
synced 2025-03-14 19:42:48 +00:00
81 lines
1.7 KiB
YAML
81 lines
1.7 KiB
YAML
name: test
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
paths:
|
|
- '.github/workflows/test.yml'
|
|
- '**.go'
|
|
- 'go.*'
|
|
- 'Makefile'
|
|
pull_request:
|
|
branches: [ master ]
|
|
paths:
|
|
- '.github/workflows/test.yml'
|
|
- '**.go'
|
|
- 'go.*'
|
|
- 'Makefile'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
go:
|
|
env:
|
|
MAXMIND_GEOLITE2_LICENSE: ${{ secrets.MAXMIND_GEOLITE2_LICENSE }}
|
|
USE_DB_IP_GEOIP_DATABASE: "1"
|
|
strategy:
|
|
matrix:
|
|
go-version:
|
|
- "1.22"
|
|
- "1.23"
|
|
- "1.24"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- name: Build applications
|
|
run: |
|
|
echo "Building with $(nproc) threads"
|
|
make client -j$(nproc)
|
|
make proxy -j$(nproc)
|
|
make server -j$(nproc)
|
|
|
|
- name: Run tests
|
|
run: |
|
|
make test TIMEOUT=120s
|
|
|
|
- name: Generate coverage report
|
|
run: |
|
|
make cover TIMEOUT=120s
|
|
echo "GOROOT=$(go env GOROOT)" >> $GITHUB_ENV
|
|
|
|
- name: Convert coverage to lcov
|
|
uses: jandelgado/gcov2lcov-action@v1.1.1
|
|
with:
|
|
infile: cover.out
|
|
outfile: cover.lcov
|
|
|
|
- name: Coveralls Parallel
|
|
uses: coverallsapp/github-action@v2.3.6
|
|
env:
|
|
COVERALLS_FLAG_NAME: run-${{ matrix.go-version }}
|
|
with:
|
|
path-to-lcov: cover.lcov
|
|
github-token: ${{ secrets.github_token }}
|
|
parallel: true
|
|
|
|
finish:
|
|
permissions:
|
|
contents: none
|
|
needs: go
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Coveralls Finished
|
|
uses: coverallsapp/github-action@v2.3.6
|
|
with:
|
|
github-token: ${{ secrets.github_token }}
|
|
parallel-finished: true
|