mirror of
https://github.com/x-motemen/ghq.git
synced 2026-09-10 07:26:27 -04:00
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: test
|
|
on:
|
|
push:
|
|
branches:
|
|
- "**"
|
|
jobs:
|
|
test:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- macOS-latest
|
|
- windows-latest
|
|
steps:
|
|
- name: setup go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.x
|
|
- name: Set git to use LF
|
|
run: |
|
|
git config --global core.autocrlf false
|
|
git config --global core.eol lf
|
|
if: "matrix.os == 'windows-latest'"
|
|
- name: checkout
|
|
uses: actions/checkout@v3
|
|
- name: test
|
|
run: go test -coverprofile coverage.out -covermode atomic ./...
|
|
- name: Send coverage
|
|
uses: shogo82148/actions-goveralls@v1
|
|
with:
|
|
github-token: ${{ secrets.github_token }}
|
|
path-to-profile: coverage.out
|
|
parallel: true
|
|
job-number: ${{ strategy.job-index }}
|
|
|
|
finish:
|
|
runs-on: ubuntu-latest
|
|
needs: test
|
|
steps:
|
|
- name: finish coverage report
|
|
uses: shogo82148/actions-goveralls@v1
|
|
with:
|
|
github-token: ${{ secrets.github_token }}
|
|
parallel-finished: true
|