| 1 |
on: [push, pull_request] |
| 2 |
name: test |
| 3 |
jobs: |
| 4 |
test: |
| 5 |
strategy: |
| 6 |
fail-fast: false |
| 7 |
matrix: |
| 8 |
go-version: [1.22.x,1.23.x,1.24.x] |
| 9 |
platform: [ubuntu-latest, macos-latest, windows-latest] |
| 10 |
runs-on: ${{ matrix.platform }} |
| 11 |
steps: |
| 12 |
- name: Install Go |
| 13 |
uses: actions/setup-go@v4 |
| 14 |
with: |
| 15 |
go-version: ${{ matrix.go-version }} |
| 16 |
- name: Checkout code |
| 17 |
uses: actions/checkout@v3 |
| 18 |
- name: Run lints |
| 19 |
uses: golangci/golangci-lint-action@v6 |
| 20 |
with: |
| 21 |
version: latest |
| 22 |
if: "matrix.platform == 'ubuntu-latest'" |
| 23 |
- name: Run tests |
| 24 |
env: |
| 25 |
GOLDMARK_TEST_TIMEOUT_MULTIPLIER: 5 |
| 26 |
run: go test -v ./... -covermode=count -coverprofile=coverage.out -coverpkg=./... |
| 27 |
- name: Install goveralls |
| 28 |
run: go install github.com/mattn/goveralls@latest |
| 29 |
- name: Send coverage |
| 30 |
if: "matrix.platform == 'ubuntu-latest'" |
| 31 |
env: |
| 32 |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 33 |
run: goveralls -coverprofile=coverage.out -service=github |