Update the PR and release pipeline

This commit is contained in:
Abdul Rabbani 2022-05-26 15:32:48 -04:00
parent d3fd7ef532
commit a99dcb4ca9
4 changed files with 43 additions and 8 deletions

View File

@ -3,10 +3,5 @@ name: Docker Build
on: [pull_request] on: [pull_request]
jobs: jobs:
build: run-tests:
name: Run docker build uses: ./.github/workflows/tests.yml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run docker build
run: make docker-build

View File

@ -3,9 +3,12 @@ on:
release: release:
types: [published] types: [published]
jobs: jobs:
run-tests:
uses: ./.github/workflows/tests.yml
build: build:
name: Run docker build name: Run docker build
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: run-tests
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Get the version - name: Get the version

37
.github/workflows/tests.yml vendored Normal file
View File

@ -0,0 +1,37 @@
name: Tests for Geth that are used in multiple jobs.
on:
workflow_call:
env:
GOPATH: /tmp/go
jobs:
build:
name: Run docker build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run docker build
run: make docker-build
statediff-unit-test:
name: Run statediff unit tests
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Create GOPATH
run: mkdir -p /tmp/go
- uses: actions/setup-go@v3
with:
go-version: ">=1.18.0"
check-latest: true
- name: Checkout code
uses: actions/checkout@v2
- name: Run unit tests
run: |
make test

View File

@ -1,4 +1,4 @@
FROM golang:1.16-alpine as builder FROM golang:1.18-alpine as builder
RUN apk --update --no-cache add make git g++ linux-headers RUN apk --update --no-cache add make git g++ linux-headers
# DEBUG # DEBUG