Skip to content

Merge branch 'main' of https://github.com/snkrdunk/octocov #7

Merge branch 'main' of https://github.com/snkrdunk/octocov

Merge branch 'main' of https://github.com/snkrdunk/octocov #7

Workflow file for this run

name: parallel
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
test-pkgs:
name: test pkgs
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out source code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version-file: go.mod
- name: Run tests coverage
run: go test ./coverage/... -coverprofile=coverage_coverage.out -covermode=count
- name: Run tests ratio
run: go test ./ratio/... -coverprofile=coverage_ratio.out -covermode=count
- name: Run tests badge
run: go test ./badge/... -coverprofile=coverage_badge.out -covermode=count
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: coverage-report-files-pkgs
path: |
coverage_coverage.out
coverage_ratio.out
coverage_badge.out
test-other:
name: test other
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out source code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version-file: go.mod
- name: Run tests other
run: go test $(go list ./... | grep -v coverage | grep -v ratio | grep -v badge) -coverprofile=coverage_other.out -covermode=count
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: coverage-report-files-other
path: |
coverage_other.out
collect-metrics:
name: collect metrics
needs:
- test-pkgs
- test-other
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEBUG: 1
steps:
- name: Check out source code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Go
id: setup-go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version-file: go.mod
- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
pattern: coverage-report-files*
merge-multiple: true
- name: Build octocov and run as a action
uses: ./testdata/actions/collect
env:
GOTOOLCHAIN: 'go${{ steps.setup-go.outputs.go-version }}'