-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: don't have separate parallel lint steps
don't save a lot of time, do cause some issues.
- Loading branch information
Showing
3 changed files
with
16 additions
and
113 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
|
@@ -9,92 +9,6 @@ on: | |
- develop | ||
|
||
jobs: | ||
lint: | ||
name: Linter | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.PRIVATE_CHECKOUT }} | ||
submodules: recursive | ||
|
||
- name: Setup nodejs | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
cache: 'yarn' | ||
cache-dependency-path: '**/yarn.lock' | ||
|
||
- name: Install go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17.x | ||
|
||
- name: Install protobufs | ||
run: | | ||
sudo apt update && sudo apt install -y protobuf-compiler | ||
go install google.golang.org/protobuf/cmd/[email protected] | ||
go install google.golang.org/grpc/cmd/[email protected] | ||
- name: Install rust stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Cache Build Products | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ runner.os }}-lint-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ runner.os }}-go- | ||
|
||
- name: Cache cbrotli | ||
uses: actions/cache@v2 | ||
id: cache-cbrotli | ||
with: | ||
path: | | ||
target/include/brotli/ | ||
target/lib-wasm/ | ||
target/lib/libbrotlicommon-static.a | ||
target/lib/libbrotlienc-static.a | ||
target/lib/libbrotlidec-static.a | ||
key: ${{ runner.os }}-brotli-${{ hashFiles('build-brotli.sh') }}-${{ hashFiles('.github/workflows/arbitrator-ci.yaml') }} | ||
restore-keys: ${{ runner.os }}-brotli- | ||
|
||
- name: Build cbrotli-local | ||
if: steps.cache-cbrotli.outputs.cache-hit != 'true' | ||
run: ./build-brotli.sh -l | ||
|
||
- name: Setup emsdk | ||
if: steps.cache-cbrotli.outputs.cache-hit != 'true' | ||
uses: mymindstorm/setup-emsdk@v11 | ||
with: | ||
# Make sure to set a version number! | ||
version: 3.1.6 | ||
# This is the name of the cache folder. | ||
# The cache folder will be placed in the build directory, | ||
# so make sure it doesn't conflict with anything! | ||
actions-cache-folder: 'emsdk-cache' | ||
|
||
- name: Build cbrotli-wasm | ||
if: steps.cache-cbrotli.outputs.cache-hit != 'true' | ||
run: ./build-brotli.sh -w | ||
|
||
- name: Build all lint dependencies | ||
run: make -j build-node-deps | ||
|
||
- name: Lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: latest | ||
skip-go-installation: true | ||
skip-pkg-cache: true | ||
|
||
test: | ||
name: Go Tests | ||
runs-on: ubuntu-latest | ||
|
@@ -218,6 +132,16 @@ jobs: | |
- name: Build | ||
run: make build test-go-deps -j | ||
|
||
- name: Build all lint dependencies | ||
run: make -j build-node-deps | ||
|
||
- name: Lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: latest | ||
skip-go-installation: true | ||
skip-pkg-cache: true | ||
|
||
- name: run tests with race detection | ||
run: gotestsum --format short-verbose --jsonfile test-output-withrace.json -- -race ./... | ||
|
||
|