mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-19 18:58:03 +02:00
44 lines
910 B
YAML
44 lines
910 B
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
|
|
jobs:
|
|
test:
|
|
name: Test (${{ matrix.os }})
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-go@v6
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Run tests
|
|
if: matrix.os == 'windows-latest'
|
|
run: go test -v ./...
|
|
|
|
- name: Run tests with coverage
|
|
if: matrix.os != 'windows-latest'
|
|
run: go test -v -coverprofile=coverage.out ./...
|
|
|
|
- name: Upload coverage
|
|
if: matrix.os == 'ubuntu-latest'
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
use_oidc: true
|
|
files: ./coverage.out
|
|
fail_ci_if_error: false
|
|
flags: unittests
|