Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update develop.yml #1148

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 12 additions & 23 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
name: CI/CD Develop Pipeline
on:
push:
branches:
- "develop"


jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -20,36 +21,26 @@ on:
with:
go-version: 1.21
- name: Install Dependencies
run: >
run: |
sudo add-apt-repository -y ppa:ethereum/ethereum

sudo apt-get update

sudo apt-get install -y npm ethereum

npm install

go get -d github.com/ethereum/[email protected] \

&& go install github.com/ethereum/go-ethereum/cmd/[email protected] \

&& go install github.com/mattn/[email protected] \

&& go install github.com/ory/[email protected] \

&& go install github.com/golangci/golangci-lint/cmd/[email protected]
go get -d github.com/ethereum/[email protected]
go install github.com/ethereum/go-ethereum/cmd/[email protected]
go install github.com/mattn/[email protected]
go install github.com/ory/[email protected]
go install github.com/golangci/golangci-lint/cmd/[email protected]
- name: Run make setup
run: make setup
- name: Run gofmt
run: |
gofmt

test -z "$(gofmt -l .)"
- name: Run golangci-lint
run: |
golangci-lint run -v --timeout 5m

- name: Execute test case
run: >
run: |
go-acc ./... --ignore razor/accounts/mocks --ignore razor/cmd/mocks
--ignore razor/utils/mocks --ignore pkg --ignore razor/path/mocks
--output coverage.txt
Expand Down Expand Up @@ -77,15 +68,13 @@ on:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Get short SHA
id: sha
run: echo "::set-output name=short::$(git rev-parse --short HEAD)"

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64/v8
push: true
tags: razornetwork/razor-go:${{ steps.sha.outputs.short }}
tags: razornetwork/razor-go:${{ steps.sha.outputs.short }}
Loading