Skip to content

Add test for Listen

Add test for Listen #6

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request: {}
workflow_call: {}
schedule:
- cron: "0 0 * * 6"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
go-version: [1.22.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: go.sum
- name: Test
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./... -timeout 2m
- name: Upload coverage reports to Codecov
if: ${{ matrix.go-version == '1.22.x' && matrix.os == 'ubuntu-latest' && github.event_name != 'workflow_dispatch' }}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: ${{ github.ref == 'refs/heads/main' }}
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
go-version: [1.22.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: go.sum
- name: Build
run: go build .