mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-10 23:10:59 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 2.3.5. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p> <blockquote> <h2>v2.3.5</h2> <p>Update dependencies</p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="1e204e9a92"><code>1e204e9</code></a> update licensed check (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/606">#606</a>)</li> <li><a href="0299a0d2b6"><code>0299a0d</code></a> update dist (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/605">#605</a>)</li> <li><a href="be0f448456"><code>be0f448</code></a> Bump ws from 5.2.2 to 5.2.3 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/604">#604</a>)</li> <li><a href="56c00a7b1f"><code>56c00a7</code></a> Bump tmpl from 1.0.4 to 1.0.5 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/588">#588</a>)</li> <li><a href="85e47d1a2b"><code>85e47d1</code></a> Bump path-parse from 1.0.6 to 1.0.7 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/568">#568</a>)</li> <li><a href="3fc17f8645"><code>3fc17f8</code></a> Bump hosted-git-info from 2.8.5 to 2.8.9 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/500">#500</a>)</li> <li><a href="e3bc06d986"><code>e3bc06d</code></a> Bump lodash from 4.17.15 to 4.17.21 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/499">#499</a>)</li> <li><a href="442567ba57"><code>442567b</code></a> Bump handlebars from 4.5.3 to 4.7.7 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/497">#497</a>)</li> <li><a href="7f00b66d06"><code>7f00b66</code></a> Bump y18n from 4.0.0 to 4.0.1 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/469">#469</a>)</li> <li><a href="eccf386318"><code>eccf386</code></a> Bump <code>@actions/core</code> from 1.1.3 to 1.2.6 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/361">#361</a>)</li> <li>Additional commits viewable in <a href="https://github.com/actions/checkout/compare/v2.3.4...v2.3.5">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
133 lines
3.5 KiB
YAML
133 lines
3.5 KiB
YAML
name: Test Coverage
|
|
on:
|
|
pull_request:
|
|
push:
|
|
paths:
|
|
- "**.go"
|
|
branches:
|
|
- master
|
|
- release/**
|
|
|
|
jobs:
|
|
split-test-files:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2.3.5
|
|
- name: Create a file with all the pkgs
|
|
run: go list ./... > pkgs.txt
|
|
- name: Split pkgs into 4 files
|
|
run: split -d -n l/4 pkgs.txt pkgs.txt.part.
|
|
# cache multiple
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "${{ github.sha }}-00"
|
|
path: ./pkgs.txt.part.00
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "${{ github.sha }}-01"
|
|
path: ./pkgs.txt.part.01
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "${{ github.sha }}-02"
|
|
path: ./pkgs.txt.part.02
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "${{ github.sha }}-03"
|
|
path: ./pkgs.txt.part.03
|
|
|
|
build-linux:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
goarch: ["arm", "amd64"]
|
|
timeout-minutes: 5
|
|
steps:
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: "1.17"
|
|
- uses: actions/checkout@v2.3.5
|
|
- uses: technote-space/get-diff-action@v5
|
|
with:
|
|
PATTERNS: |
|
|
**/**.go
|
|
"!test/"
|
|
go.mod
|
|
go.sum
|
|
- name: install
|
|
run: GOOS=linux GOARCH=${{ matrix.goarch }} make build
|
|
if: "env.GIT_DIFF != ''"
|
|
|
|
tests:
|
|
runs-on: ubuntu-latest
|
|
needs: split-test-files
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
part: ["00", "01", "02", "03"]
|
|
steps:
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: "1.17"
|
|
- uses: actions/checkout@v2.3.5
|
|
- uses: technote-space/get-diff-action@v5
|
|
with:
|
|
PATTERNS: |
|
|
**/**.go
|
|
"!test/"
|
|
go.mod
|
|
go.sum
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "${{ github.sha }}-${{ matrix.part }}"
|
|
if: env.GIT_DIFF
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: "1.17"
|
|
- name: test & coverage report creation
|
|
run: |
|
|
cat pkgs.txt.part.${{ matrix.part }} | xargs go test -mod=readonly -timeout 8m -race -coverprofile=${{ matrix.part }}profile.out
|
|
if: env.GIT_DIFF
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "${{ github.sha }}-${{ matrix.part }}-coverage"
|
|
path: ./${{ matrix.part }}profile.out
|
|
|
|
upload-coverage-report:
|
|
runs-on: ubuntu-latest
|
|
needs: tests
|
|
steps:
|
|
- uses: actions/checkout@v2.3.5
|
|
- uses: technote-space/get-diff-action@v5
|
|
with:
|
|
PATTERNS: |
|
|
**/**.go
|
|
"!test/"
|
|
go.mod
|
|
go.sum
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "${{ github.sha }}-00-coverage"
|
|
if: env.GIT_DIFF
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "${{ github.sha }}-01-coverage"
|
|
if: env.GIT_DIFF
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "${{ github.sha }}-02-coverage"
|
|
if: env.GIT_DIFF
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "${{ github.sha }}-03-coverage"
|
|
if: env.GIT_DIFF
|
|
- run: |
|
|
cat ./*profile.out | grep -v "mode: set" >> coverage.txt
|
|
if: env.GIT_DIFF
|
|
- uses: codecov/codecov-action@v2.1.0
|
|
with:
|
|
file: ./coverage.txt
|
|
if: env.GIT_DIFF
|