Skip to content

fix(cli): keep the token out of the log for a network listener #220

fix(cli): keep the token out of the log for a network listener

fix(cli): keep the token out of the log for a network listener #220

Workflow file for this run

name: Unit-Tests
on:
pull_request:
paths:
- 'go.mod'
- '**.go'
- '**.yml'
- 'web/**'
- '.github/workflows/go.yml'
push:
branches: # Only trigger branch pushes; tag pushes are ignored.
- '**'
paths:
- 'go.mod'
- '**.go'
- '**.yml'
- 'web/**'
- '.github/workflows/go.yml'
jobs:
test:
name: Test on go ${{ matrix.go_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
go_version: [1.25, stable]
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Setup Go Faster
uses: WillAbides/setup-go-faster@v1.15.0
timeout-minutes: 3
with:
go-version: ${{ matrix.go_version }}
- name: Run staticcheck
uses: reviewdog/action-staticcheck@v1
if: ${{ matrix.os == 'ubuntu-latest' && matrix.go_version == 'stable' }}
with:
github_token: ${{ secrets.github_token }}
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review].
reporter: github-check
# Report all results. [added,diff_context,file,nofilter].
filter_mode: added
# Exit with 1 when it finds at least one finding.
fail_level: 'none'
- name: Mod tidy
run: |
go mod tidy
- name: Setup pnpm
if: ${{ matrix.os == 'ubuntu-latest' && matrix.go_version == 'stable' }}
uses: pnpm/action-setup@v5
with:
# The frontend project owns the pnpm version: read packageManager from
# web/package.json (the action defaults to the repository root, where
# there is no package.json, and fails with "No pnpm version is
# specified").
package_json_file: web/package.json
- name: Setup Node
if: ${{ matrix.os == 'ubuntu-latest' && matrix.go_version == 'stable' }}
uses: actions/setup-node@v5
with:
node-version: 22
cache: pnpm
cache-dependency-path: web/pnpm-lock.yaml
# The Go build works without a frontend bundle (the dist placeholder keeps
# //go:embed valid), so this step verifies the real bundle can be produced.
- name: Build web console
if: ${{ matrix.os == 'ubuntu-latest' && matrix.go_version == 'stable' }}
working-directory: web
run: |
pnpm install --frozen-lockfile
pnpm build
- name: Run unit tests
# run: go test -v -cover ./...
# must add " for profile.cov on Windows OS
run: |
go test -coverprofile="profile.cov" ./...