|
@ -8,19 +8,25 @@ on: |
|
|
- master |
|
|
- master |
|
|
- release/** |
|
|
- release/** |
|
|
|
|
|
|
|
|
|
|
|
permissions: |
|
|
|
|
|
contents: read |
|
|
|
|
|
|
|
|
jobs: |
|
|
jobs: |
|
|
tests: |
|
|
tests: |
|
|
|
|
|
permissions: |
|
|
|
|
|
contents: read # for actions/checkout to fetch code |
|
|
|
|
|
pull-requests: read # for technote-space/get-diff-action to get git reference |
|
|
runs-on: ubuntu-latest |
|
|
runs-on: ubuntu-latest |
|
|
strategy: |
|
|
strategy: |
|
|
fail-fast: false |
|
|
fail-fast: false |
|
|
matrix: |
|
|
matrix: |
|
|
part: ["00", "01", "02", "03", "04", "05"] |
|
|
part: ["00", "01", "02", "03", "04", "05"] |
|
|
steps: |
|
|
steps: |
|
|
- uses: actions/setup-go@v2 |
|
|
|
|
|
|
|
|
- uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2 |
|
|
with: |
|
|
with: |
|
|
go-version: "1.17" |
|
|
go-version: "1.17" |
|
|
- uses: actions/checkout@v3 |
|
|
|
|
|
- uses: technote-space/get-diff-action@v6.0.1 |
|
|
|
|
|
|
|
|
- uses: actions/checkout@b0e28b5ac45a892f91e7d036f8200cf5ed489415 # v3 |
|
|
|
|
|
- uses: technote-space/get-diff-action@832a70d288f9623f9af054e9f5d8f52df7492c0a # v6.0.1 |
|
|
with: |
|
|
with: |
|
|
PATTERNS: | |
|
|
PATTERNS: | |
|
|
**/**.go |
|
|
**/**.go |
|
@ -32,17 +38,20 @@ jobs: |
|
|
run: | |
|
|
run: | |
|
|
make test-group-${{ matrix.part }} NUM_SPLIT=6 |
|
|
make test-group-${{ matrix.part }} NUM_SPLIT=6 |
|
|
if: env.GIT_DIFF |
|
|
if: env.GIT_DIFF |
|
|
- uses: actions/upload-artifact@v2 |
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # v2 |
|
|
with: |
|
|
with: |
|
|
name: "${{ github.sha }}-${{ matrix.part }}-coverage" |
|
|
name: "${{ github.sha }}-${{ matrix.part }}-coverage" |
|
|
path: ./build/${{ matrix.part }}.profile.out |
|
|
path: ./build/${{ matrix.part }}.profile.out |
|
|
|
|
|
|
|
|
upload-coverage-report: |
|
|
upload-coverage-report: |
|
|
|
|
|
permissions: |
|
|
|
|
|
contents: read # for actions/checkout to fetch code |
|
|
|
|
|
pull-requests: read # for technote-space/get-diff-action to get git reference |
|
|
runs-on: ubuntu-latest |
|
|
runs-on: ubuntu-latest |
|
|
needs: tests |
|
|
needs: tests |
|
|
steps: |
|
|
steps: |
|
|
- uses: actions/checkout@v3 |
|
|
|
|
|
- uses: technote-space/get-diff-action@v6.0.1 |
|
|
|
|
|
|
|
|
- uses: actions/checkout@b0e28b5ac45a892f91e7d036f8200cf5ed489415 # v3 |
|
|
|
|
|
- uses: technote-space/get-diff-action@832a70d288f9623f9af054e9f5d8f52df7492c0a # v6.0.1 |
|
|
with: |
|
|
with: |
|
|
PATTERNS: | |
|
|
PATTERNS: | |
|
|
**/**.go |
|
|
**/**.go |
|
@ -50,26 +59,26 @@ jobs: |
|
|
go.mod |
|
|
go.mod |
|
|
go.sum |
|
|
go.sum |
|
|
Makefile |
|
|
Makefile |
|
|
- uses: actions/download-artifact@v2 |
|
|
|
|
|
|
|
|
- uses: actions/download-artifact@f023be2c48cc18debc3bacd34cb396e0295e2869 # v2 |
|
|
with: |
|
|
with: |
|
|
name: "${{ github.sha }}-00-coverage" |
|
|
name: "${{ github.sha }}-00-coverage" |
|
|
if: env.GIT_DIFF |
|
|
if: env.GIT_DIFF |
|
|
- uses: actions/download-artifact@v2 |
|
|
|
|
|
|
|
|
- uses: actions/download-artifact@f023be2c48cc18debc3bacd34cb396e0295e2869 # v2 |
|
|
with: |
|
|
with: |
|
|
name: "${{ github.sha }}-01-coverage" |
|
|
name: "${{ github.sha }}-01-coverage" |
|
|
if: env.GIT_DIFF |
|
|
if: env.GIT_DIFF |
|
|
- uses: actions/download-artifact@v2 |
|
|
|
|
|
|
|
|
- uses: actions/download-artifact@f023be2c48cc18debc3bacd34cb396e0295e2869 # v2 |
|
|
with: |
|
|
with: |
|
|
name: "${{ github.sha }}-02-coverage" |
|
|
name: "${{ github.sha }}-02-coverage" |
|
|
if: env.GIT_DIFF |
|
|
if: env.GIT_DIFF |
|
|
- uses: actions/download-artifact@v2 |
|
|
|
|
|
|
|
|
- uses: actions/download-artifact@f023be2c48cc18debc3bacd34cb396e0295e2869 # v2 |
|
|
with: |
|
|
with: |
|
|
name: "${{ github.sha }}-03-coverage" |
|
|
name: "${{ github.sha }}-03-coverage" |
|
|
if: env.GIT_DIFF |
|
|
if: env.GIT_DIFF |
|
|
- run: | |
|
|
- run: | |
|
|
cat ./*profile.out | grep -v "mode: set" >> coverage.txt |
|
|
cat ./*profile.out | grep -v "mode: set" >> coverage.txt |
|
|
if: env.GIT_DIFF |
|
|
if: env.GIT_DIFF |
|
|
- uses: codecov/codecov-action@v2.1.0 |
|
|
|
|
|
|
|
|
- uses: codecov/codecov-action@50ffd5fc58ed613b7848c7604df3a1effc13d659 # v2.1.0 |
|
|
with: |
|
|
with: |
|
|
file: ./coverage.txt |
|
|
file: ./coverage.txt |
|
|
if: env.GIT_DIFF |
|
|
if: env.GIT_DIFF |