Skip to content

POC: feat(rewardService): add reward call retries #2006

POC: feat(rewardService): add reward call retries

POC: feat(rewardService): add reward call retries #2006

Workflow file for this run

name: Trigger test suite
on:
pull_request:
branches:
- master
push:
branches:
- master
tags:
- "v*"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
name: Run tests defined for the project
runs-on: ubuntu-20.04
steps:
- name: Setup ubuntu container
run: |
sudo apt update
sudo apt install -yqq build-essential make software-properties-common
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt update && sudo apt install -yqq git zip unzip zlib1g-dev zlib1g
- name: Check out code
uses: actions/[email protected]
with:
fetch-depth: 0
# Check https://github.com/livepeer/go-livepeer/pull/1891
# for ref value discussion
ref: ${{ github.event.pull_request.head.sha }}
- name: Cleanup hosted runner
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android
- name: Set up go
id: go
uses: actions/setup-go@v5
with:
go-version: 1.20.4
cache: true
cache-dependency-path: go.sum
- name: Cache ffmpeg
id: cache-ffmpeg
uses: actions/cache@v4
with:
path: /home/runner/compiled
key: ${{ runner.os }}-ffmpeg-${{ hashFiles('install_ffmpeg.sh') }}
restore-keys: |
${{ runner.os }}-ffmpeg
- name: Install protobuf
run: |
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]
sudo apt update
sudo apt install -yqq protobuf-compiler
- name: Install dependencies
run: |
sudo apt update \
&& sudo apt install -yqq software-properties-common curl apt-transport-https lsb-release \
&& curl -fsSl https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - \
&& sudo add-apt-repository "deb https://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-14 main" \
&& sudo apt update \
&& sudo apt -yqq install clang-14 clang-tools-14 lld-14 build-essential pkg-config autoconf git python
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 30 \
&& sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 30 \
&& sudo update-alternatives --install /usr/bin/ld ld /usr/bin/lld-14 30
- name: Install go modules
# if: steps.go.outputs.cache-hit != 'true'
run: go mod download
- name: Install ffmpeg
if: steps.cache-ffmpeg.outputs.cache-hit != 'true'
run: ./install_ffmpeg.sh
- name: go fmt
run: |
git config --global --add safe.directory '*'
echo "PKG_CONFIG_PATH=/home/runner/compiled/lib/pkgconfig" >> $GITHUB_ENV
go fmt ./...
git diff --exit-code
- name: Lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.52.2
skip-pkg-cache: true
args: '--disable-all --enable=gofmt --enable=vet --enable=golint --deadline=4m pm verification'
- name: Run Revive Action by building from repository
uses: docker://morphy/revive-action:v2
with:
config: config.toml
- name: misspell
uses: reviewdog/action-misspell@v1
- name: Run tests with coverage
env:
CGO_CFLAGS: "-lz"
PKG_CONFIG_PATH: "/home/runner/compiled/lib/pkgconfig"
run: |
./test.sh
./test_e2e.sh
- name: Upload coverage reports
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CI_CODECOV_TOKEN }}
files: ./cover.out
name: ${{ github.event.repository.name }}
gcov_ignore: ./eth/stubclient.go
codeql:
name: Perform CodeQL analysis
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/[email protected]
with:
fetch-depth: 0
# Check https://github.com/livepeer/go-livepeer/pull/1891
# for ref value discussion
ref: ${{ github.event.pull_request.head.sha }}
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: go
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
editorconfig:
name: Run editorconfig checker
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/[email protected]
with:
# Check https://github.com/livepeer/go-livepeer/pull/1891
# for ref value discussion
ref: ${{ github.event.pull_request.head.sha }}
- name: Install editorconfig-checker
uses: editorconfig-checker/action-editorconfig-checker@main
- name: Run editorconfig checker against the repo
run: editorconfig-checker