Skip to content

test: add e2e test step in the CI (#215) #580

test: add e2e test step in the CI (#215)

test: add e2e test step in the CI (#215) #580

Workflow file for this run

name: CI
# This workflow is run on pushes to main & every Pull Requests except changes to tools/interop-node.
on:
pull_request:
push:
branches:
- main
- release/**
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}-build
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
check-latest: true
- uses: golangci/golangci-lint-action@v6.0.1
with:
version: latest
args: --timeout 10m
github-token: ${{ secrets.github_token }}
# skip cache because of flaky behaviors
skip-build-cache: true
skip-pkg-cache: true
if: "env.GIT_DIFF"
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
check-latest: true
- name: Test
run: make test
build:
runs-on: ubuntu-latest
needs: [lint, test]
if: ${{ always() && (needs.lint.result == 'success' || needs.test.result == 'success') }}
strategy:
matrix:
go-arch: ["amd64"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
check-latest: true
- uses: technote-space/get-diff-action@v6.1.2
id: git_diff
with:
PATTERNS: |
**/**.go
go.mod
go.sum
**/go.mod
**/go.sum
**/Makefile
Makefile
.github/workflows/build.yml
- name: Download Go Dependency
if: env.GIT_DIFF
run : go mod download
- name: Build
if: env.GIT_DIFF
run: GOOS=linux GOARCH=${{ matrix.go-arch }} make build