Merge pull request #240 from k1LoW/tagpr-from-v0.49.0 #318
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Run tests pkg/coverage | |
run: go test ./pkg/coverage/... -coverprofile=coverage_coverage.out -covermode=count | |
- name: Run tests pkg/ratio | |
run: go test ./pkg/ratio/... -coverprofile=coverage_ratio.out -covermode=count | |
- name: Run tests pkg/badge | |
run: go test ./pkg/badge/... -coverprofile=coverage_badge.out -covermode=count | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: coverage-report-files | |
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@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Run tests other | |
run: go test $(go list ./... | grep -v pkg) -coverprofile=coverage_other.out -covermode=count | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: coverage-report-files | |
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@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- uses: actions/download-artifact@v2 | |
with: | |
name: coverage-report-files | |
- name: Build octocov and run as a action | |
uses: ./testdata/actions/collect |