Skip to content

tests: Add test cases for unexpected delimiter #54

tests: Add test cases for unexpected delimiter

tests: Add test cases for unexpected delimiter #54

Workflow file for this run

name: Go
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.18', 'oldstable', 'stable' ]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ matrix.go-version }}
cache: false
- name: Build
run: go build -v ./...
- name: Test
run: go test -race -coverprofile=cobs-${{ matrix.go-version }}-coverage.txt -covermode=atomic ./...
- name: Upload coverage
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: coverage-${{ matrix.go-version }}
path: cobs-${{ matrix.go-version }}-coverage.txt
coverage-report:
runs-on: ubuntu-latest
needs: [build]
if: github.repository_owner == 'pdgendt'
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Download all coverage artifacts
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
- name: Upload coverage to Codecov
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
with:
token: ${{ secrets.CODECOV_TOKEN }}