Skip to content

Commit

Permalink
feat(ci): hive CI tidy up (#2)
Browse files Browse the repository at this point in the history
run hive on successful CI only
run on non-draft PR only
  • Loading branch information
revitteth committed Jul 22, 2022
1 parent 3c58a2e commit d8abe6d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 37 deletions.
36 changes: 35 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,25 @@ jobs:
- name: sudo make docker
run: sudo DOCKER_TAG=thorax/erigon:ci-$GITHUB_SHA DOCKER_UID=$(id -u) DOCKER_GID=$(id -g) make docker

hive:
needs:
- tests
- tests-windows
- docker
runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
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

Expand All @@ -130,4 +149,19 @@ jobs:
if: always()
with:
name: hive-ci-output
path: results/*.xml
path: results/*.xml

event_file:
needs:
- tests
- tests-windows
- docker
name: archive event file
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
steps:
- name: upload
uses: actions/upload-artifact@v2
with:
name: event file
path: ${{ github.event_path }}
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: ["Hive"]
workflows: ["CI"]
types:
- completed

Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/hive.yml

This file was deleted.

0 comments on commit d8abe6d

Please sign in to comment.