Update node #34
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
nodeRepo: | |
description: 'lux node github repository' | |
required: true | |
default: 'luxdefi/node' | |
nodeBranch: | |
description: 'node branch' | |
required: true | |
default: 'master' | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: check out ${{ github.event.inputs.nodeRepo }} ${{ github.event.inputs.nodeBranch }} | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
uses: actions/checkout@v2 | |
with: | |
repository: ${{ github.event.inputs.nodeRepo }} | |
ref: ${{ github.event.inputs.nodeBranch }} | |
path: node | |
token: ${{ secrets.LUX_PAT }} | |
- uses: actions/setup-go@v1 | |
with: | |
go-version: 1.18 | |
- name: change node dep | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
run: | | |
go mod edit -replace github.com/luxdefi/node=./lux | |
go mod tidy | |
go clean -modcache # avoid conflicts with the golangci-lint-action cache | |
- run: ./scripts/lint_allowed_geth_imports.sh | |
shell: bash | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v2 | |
with: | |
version: v1.47 | |
working-directory: . | |
args: --timeout 3m | |
test: | |
name: Golang Unit Tests v${{ matrix.go }} (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
go: ['1.18'] | |
os: [macos-11.0, ubuntu-18.04, windows-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: check out ${{ github.event.inputs.nodeRepo }} ${{ github.event.inputs.nodeBranch }} | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
uses: actions/checkout@v2 | |
with: | |
repository: ${{ github.event.inputs.nodeRepo }} | |
ref: ${{ github.event.inputs.nodeBranch }} | |
path: node | |
token: ${{ secrets.LUX_PAT }} | |
- uses: actions/setup-go@v1 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: change node dep | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
run: | | |
go mod edit -replace github.com/luxdefi/node=./lux | |
go mod tidy | |
- run: go mod download | |
shell: bash | |
- run: ./scripts/build.sh evm | |
shell: bash | |
- run: ./scripts/build_test.sh | |
shell: bash | |
- run: ./scripts/coverage.sh | |
shell: bash | |
test-race: | |
name: Golang Unit Tests Race Detection v${{ matrix.go }} (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
go: ['1.18'] | |
os: [ubuntu-20.04] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: check out ${{ github.event.inputs.nodeRepo }} ${{ github.event.inputs.nodeBranch }} | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
uses: actions/checkout@v2 | |
with: | |
repository: ${{ github.event.inputs.nodeRepo }} | |
ref: ${{ github.event.inputs.nodeBranch }} | |
path: node | |
token: ${{ secrets.LUX_PAT }} | |
- uses: actions/setup-go@v1 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: change node dep | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
run: | | |
go mod edit -replace github.com/luxdefi/node=./lux | |
go mod tidy | |
- run: go mod download | |
shell: bash | |
- run: ./scripts/build.sh evm | |
shell: bash | |
- run: ./scripts/build_test.sh -race | |
shell: bash | |
e2e: | |
name: Golang E2E Tests v${{ matrix.go }} (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
go: [ '1.18' ] | |
os: [ ubuntu-20.04 ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: check out ${{ github.event.inputs.nodeRepo }} ${{ github.event.inputs.nodeBranch }} | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
uses: actions/checkout@v2 | |
with: | |
repository: ${{ github.event.inputs.nodeRepo }} | |
ref: ${{ github.event.inputs.nodeBranch }} | |
path: node | |
token: ${{ secrets.LUX_PAT }} | |
- uses: actions/setup-go@v1 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: change node dep | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
run: | | |
go mod edit -replace github.com/luxdefi/node=./lux | |
go mod tidy | |
- name: prepare node directory for docker copy | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
# mv node/ to nested dir node/node/ | |
# required because docker instruction "COPY dir ." copies dir/* to . | |
run: mkdir node_tmp && mv node node_tmp && mv node_tmp node | |
- run: .github/workflows/run_e2e_tests.sh --parallelism 1 --client-id $KURTOSIS_CLIENT_ID --client-secret $KURTOSIS_CLIENT_SECRET | |
shell: bash | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASS: ${{ secrets.DOCKER_PASS }} | |
KURTOSIS_CLIENT_ID: ${{ secrets.KURTOSIS_CLIENT_ID }} | |
KURTOSIS_CLIENT_SECRET: ${{ secrets.KURTOSIS_CLIENT_SECRET }} |