PublicLogs update to provide more information #1170
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-latest | |
container: | |
image: ubuntu:18.04 | |
steps: | |
- name: Setup ubuntu container | |
run: | | |
apt update | |
apt install -yqq build-essential make software-properties-common | |
add-apt-repository -y ppa:git-core/ppa | |
apt update && 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: Set up go | |
id: go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.20.4 | |
cache: true | |
cache-dependency-path: go.sum | |
- name: Cache ffmpeg | |
id: cache-ffmpeg | |
uses: actions/cache@v3 | |
with: | |
path: /github/home/compiled | |
key: ${{ runner.os }}-ffmpeg-${{ hashFiles('install_ffmpeg.sh') }} | |
restore-keys: | | |
${{ runner.os }}-ffmpeg | |
- name: Install dependencies | |
run: | | |
apt-get update \ | |
&& apt-get install -yqq software-properties-common curl apt-transport-https \ | |
&& apt-key adv --keyserver keyserver.ubuntu.com --recv 15CF4D18AF4F7421 \ | |
&& add-apt-repository "deb [arch=amd64] http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main" \ | |
&& apt-get update \ | |
&& apt-get -yqq install clang-8 clang-tools-8 build-essential pkg-config autoconf git python | |
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-8 30 \ | |
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-8 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: Install protobuf | |
run: | | |
go install github.com/golang/protobuf/[email protected] | |
apt-get update | |
apt-get install -yqq protobuf-compiler | |
- name: go fmt | |
run: | | |
git config --global --add safe.directory '*' | |
echo "PKG_CONFIG_PATH=/github/home/compiled/lib/pkgconfig" >> $GITHUB_ENV | |
go fmt ./... | |
git diff --exit-code | |
- name: Lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.52.2 | |
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" | |
run: | | |
export PKG_CONFIG_PATH=/github/home/compiled/lib/pkgconfig | |
./test.sh | |
./test_e2e.sh | |
- name: Upload coverage reports | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./cover.out | |
name: ${{ github.event.repository.name }} | |
verbose: true | |
gcov_ignore: ./eth/stubclient.go | |
codeql: | |
name: Perform CodeQL analysis | |
runs-on: ubuntu-latest | |
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@v2 | |
with: | |
languages: go | |
- name: Autobuild | |
uses: github/codeql-action/autobuild@v2 | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
editorconfig: | |
name: Run editorconfig checker | |
runs-on: ubuntu-latest | |
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 |