Skip to content

Commit

Permalink
hive - run on successful CI (ledgerwatch#4791)
Browse files Browse the repository at this point in the history
* feat(ci): run hive tests as part of CI

* feat(ci): hive CI tidy up (#2)

run hive on successful CI only
run on non-draft PR only
  • Loading branch information
revitteth committed Jul 22, 2022
1 parent cd8b10f commit d2bbf22
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 3 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Continuous integration
name: CI
on:
push:
branches:
Expand All @@ -10,8 +10,15 @@ on:
- devel
- alpha
- stable
types:
- opened
- reopened
- synchronize
- ready_for_review

jobs:
tests:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
strategy:
matrix:
os: [ ubuntu-20.04, macos-11 ] # list of os: https://github.com/actions/virtual-environments
Expand Down Expand Up @@ -59,6 +66,7 @@ jobs:
run: make test

tests-windows:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
strategy:
matrix:
os: [ windows-2022 ]
Expand Down Expand Up @@ -97,6 +105,7 @@ jobs:
run: .\wmake.ps1 test

docker:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
Expand All @@ -121,4 +130,4 @@ jobs:
if: always()
with:
name: hive-ci-output
path: results/*.xml
path: results/*.xml
2 changes: 1 addition & 1 deletion .github/workflows/hive-results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Hive results

on:
workflow_run:
workflows: ["Continuous integration", "ci"]
workflows: ["Hive"]
types:
- completed

Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/hive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Hive
on:
workflow_run:
workflows: ["CI"]
types:
- completed

jobs:
hive:
runs-on: ubuntu-20.04
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # fetch git tags for "git describe"

- name: build erigon image
run: DOCKER_TAG=thorax/erigon:ci-$GITHUB_SHA DOCKER_UID=$(id -u) DOCKER_GID=$(id -g) make docker

# check with root permissions, should be cached from previous build
- name: build erigon image (root permissions)
run: sudo DOCKER_TAG=thorax/erigon:ci-$GITHUB_SHA DOCKER_UID=$(id -u) DOCKER_GID=$(id -g) make docker

- name: run hive
run: sudo mkdir /results && docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v ${{ github.workspace }}:/work gatewayfm/hive:latest --sim ethereum/engine --results-root=/work/results --client erigon_ci-$GITHUB_SHA --docker.output --loglevel 5

- name: parse hive output
run: docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v ${{ github.workspace }}:/work --entrypoint /app/hivecioutput gatewayfm/hive:latest --resultsdir=/work/results --outdir=/work/results

- name: archive hive results
uses: actions/upload-artifact@v3
if: always()
with:
name: hive-ci-output
path: results/*.xml

0 comments on commit d2bbf22

Please sign in to comment.