-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ae7b13
commit 3707bf4
Showing
247 changed files
with
33,556 additions
and
6,862 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,29 +14,36 @@ jobs: | |
- name: Create a file with all the pkgs | ||
run: go list ./... > pkgs.txt | ||
- name: Split pkgs into 4 files | ||
run: split -n l/4 --additional-suffix=.txt ./pkgs.txt | ||
run: split -d -n l/4 pkgs.txt pkgs.txt.part. | ||
# cache multiple | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: "${{ github.sha }}-aa" | ||
path: ./xaa.txt | ||
name: "${{ github.sha }}-00" | ||
path: ./pkgs.txt.part.00 | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: "${{ github.sha }}-ab" | ||
path: ./xab.txt | ||
name: "${{ github.sha }}-01" | ||
path: ./pkgs.txt.part.01 | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: "${{ github.sha }}-ac" | ||
path: ./xac.txt | ||
name: "${{ github.sha }}-02" | ||
path: ./pkgs.txt.part.02 | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: "${{ github.sha }}-ad" | ||
path: ./xad.txt | ||
name: "${{ github.sha }}-03" | ||
path: ./pkgs.txt.part.03 | ||
|
||
test-coverage-part-1: | ||
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.15.4" | ||
- uses: actions/checkout@v2 | ||
- uses: technote-space/get-diff-action@v4 | ||
with: | ||
|
@@ -46,20 +53,20 @@ jobs: | |
go.sum | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: "${{ github.sha }}-aa" | ||
name: "${{ github.sha }}-${{ matrix.part }}" | ||
if: env.GIT_DIFF | ||
- name: test & coverage report creation | ||
run: | | ||
cat xaa.txt | xargs go test -mod=readonly -timeout 8m -race -coverprofile=coverage.txt -covermode=atomic | ||
cat pkgs.txt.part.${{ matrix.part }} | xargs go test -mod=readonly -timeout 8m -race -coverprofile=${{ matrix.part }}profile.out -covermode=atomic | ||
if: env.GIT_DIFF | ||
- uses: codecov/[email protected] | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
file: ./coverage.txt | ||
if: env.GIT_DIFF | ||
name: "${{ github.sha }}-${{ matrix.part }}-coverage" | ||
path: ./${{ matrix.part }}profile.out | ||
|
||
test-coverage-part-2: | ||
upload-coverage-report: | ||
runs-on: ubuntu-latest | ||
needs: split-test-files | ||
needs: tests | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: technote-space/get-diff-action@v4 | ||
|
@@ -70,61 +77,24 @@ jobs: | |
go.sum | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: "${{ github.sha }}-ab" | ||
if: env.GIT_DIFF | ||
- name: test & coverage report creation | ||
run: | | ||
cat xab.txt | xargs go test -mod=readonly -timeout 5m -race -coverprofile=coverage.txt -covermode=atomic | ||
if: env.GIT_DIFF | ||
- uses: codecov/[email protected] | ||
with: | ||
file: ./coverage.txt | ||
name: "${{ github.sha }}-00-coverage" | ||
if: env.GIT_DIFF | ||
|
||
test-coverage-part-3: | ||
runs-on: ubuntu-latest | ||
needs: split-test-files | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: technote-space/get-diff-action@v4 | ||
with: | ||
PATTERNS: | | ||
**/**.go | ||
go.mod | ||
go.sum | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: "${{ github.sha }}-ac" | ||
if: env.GIT_DIFF | ||
- name: test & coverage report creation | ||
run: | | ||
cat xac.txt | xargs go test -mod=readonly -timeout 10m -race -coverprofile=coverage.txt -covermode=atomic | ||
name: "${{ github.sha }}-01-coverage" | ||
if: env.GIT_DIFF | ||
- uses: codecov/[email protected] | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
file: ./coverage.txt | ||
name: "${{ github.sha }}-02-coverage" | ||
if: env.GIT_DIFF | ||
|
||
test-coverage-part-4: | ||
runs-on: ubuntu-latest | ||
needs: split-test-files | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: technote-space/get-diff-action@v4 | ||
with: | ||
PATTERNS: | | ||
**/**.go | ||
go.mod | ||
go.sum | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: "${{ github.sha }}-ad" | ||
name: "${{ github.sha }}-03-coverage" | ||
if: env.GIT_DIFF | ||
- name: test & coverage report creation | ||
run: | | ||
cat xad.txt | xargs go test -mod=readonly -timeout 5m -race -coverprofile=coverage.txt -covermode=atomic | ||
- run: | | ||
cat ./*profile.out | grep -v "mode: atomic" >> coverage.txt | ||
if: env.GIT_DIFF | ||
- uses: codecov/[email protected].14 | ||
- uses: codecov/[email protected].15 | ||
with: | ||
file: ./coverage.txt | ||
if: env.GIT_DIFF |
Oops, something went wrong.