forked from ChainSafe/gossamer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: isolated test worksflows for individual job runs (ChainSafe#1730)
Co-authored-by: Arijit Das <[email protected]>
- Loading branch information
Showing
8 changed files
with
263 additions
and
230 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
on: [pull_request] | ||
name: code-cov | ||
env: | ||
GO111MODULE: on | ||
|
||
jobs: | ||
publish-code-coverage: | ||
strategy: | ||
matrix: | ||
go-version: [1.15.x] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: go-cache-paths | ||
run: | | ||
echo "::set-output name=go-build::$(go env GOCACHE)" | ||
echo "::set-output name=go-mod::$(go env GOMODCACHE)" | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- uses: actions/checkout@v2 | ||
|
||
# cache go build cache | ||
- name: Cache go modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.go-cache-paths.outputs.go-build }} | ||
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ runner.os }}-go-build | ||
|
||
# cache go mod cache | ||
- name: Cache go modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.go-cache-paths.outputs.go-mod }} | ||
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ runner.os }}-go-mod | ||
|
||
- name: Install Subkey | ||
run: | | ||
wget -P $HOME/.local/bin/ https://chainbridge.ams3.digitaloceanspaces.com/subkey-v2.0.0 | ||
mv $HOME/.local/bin/subkey-v2.0.0 $HOME/.local/bin/subkey | ||
chmod +x $HOME/.local/bin/subkey | ||
echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
- name: Generate coverage report | ||
run: | | ||
go test ./... -short -coverprofile=coverage.out -covermode=atomic -timeout=20m | ||
- uses: codecov/codecov-action@v1 | ||
with: | ||
if_ci_failed: success | ||
informational: true | ||
files: ./coverage.out | ||
flags: unit-tests | ||
name: coverage | ||
verbose: true |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
on: [pull_request] | ||
name: docker-grandpa | ||
env: | ||
GO111MODULE: on | ||
|
||
jobs: | ||
docker-grandpa-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- | ||
name: Build | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
load: true | ||
file: ./Dockerfile | ||
platforms: linux/amd64 | ||
push: false | ||
tags: chainsafe/gossamer:test | ||
- | ||
name: Run grandpa | ||
run: | | ||
docker run chainsafe/gossamer:test sh -c "make it-grandpa" |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
on: [pull_request] | ||
name: docker-js | ||
env: | ||
GO111MODULE: on | ||
|
||
jobs: | ||
docker-polkadotjs-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- | ||
name: Build | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
load: true | ||
file: ./Dockerfile | ||
platforms: linux/amd64 | ||
push: false | ||
tags: chainsafe/gossamer:test | ||
- | ||
name: Run polkadotjs tests | ||
run: | | ||
docker run chainsafe/gossamer:test sh -c "make it-polkadotjs" |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
on: [pull_request] | ||
name: docker-rpc | ||
env: | ||
GO111MODULE: on | ||
|
||
jobs: | ||
docker-rpc-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- | ||
name: Build | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
load: true | ||
file: ./Dockerfile | ||
platforms: linux/amd64 | ||
push: false | ||
tags: chainsafe/gossamer:test | ||
- | ||
name: Run rpc tests | ||
run: | | ||
docker run chainsafe/gossamer:test sh -c "make it-rpc" |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
on: [pull_request] | ||
name: docker-stable | ||
env: | ||
GO111MODULE: on | ||
|
||
jobs: | ||
docker-stable-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- | ||
name: Build | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
load: true | ||
file: ./Dockerfile | ||
platforms: linux/amd64 | ||
push: false | ||
tags: chainsafe/gossamer:test | ||
- | ||
name: Run stable tests | ||
run: | | ||
docker run chainsafe/gossamer:test sh -c "make it-stable" |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
on: [pull_request] | ||
name: docker-stress | ||
env: | ||
GO111MODULE: on | ||
|
||
jobs: | ||
docker-stress-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- | ||
name: Build | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
load: true | ||
file: ./Dockerfile | ||
platforms: linux/amd64 | ||
push: false | ||
tags: chainsafe/gossamer:test | ||
- | ||
name: Run stress | ||
run: | | ||
docker run chainsafe/gossamer:test sh -c "make it-stress" |
Oops, something went wrong.