mirror of
https://github.com/asticode/go-astikit.git
synced 2025-12-24 11:50:53 +08:00
43 lines
935 B
YAML
43 lines
935 B
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches: [ "master", "dev" ]
|
|
pull_request:
|
|
branches: [ "master" ]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.20'
|
|
|
|
- name: Check external dependencies
|
|
run: |
|
|
bash .github/workflows/no_external_dependencies.sh
|
|
|
|
- name: Install dependencies
|
|
run: go mod download
|
|
|
|
- name: Run tests
|
|
run: go test -race -covermode atomic -coverprofile=covprofile ./...
|
|
|
|
- if: github.event_name != 'pull_request'
|
|
name: Send coverage
|
|
env:
|
|
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
|
|
run: |
|
|
go install github.com/mattn/goveralls@latest
|
|
goveralls -coverprofile=covprofile -service=github
|