chore(deps): Bump github.com/golangci/golangci-lint from 1.48.0 to 1.62.2 #129
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: Tests | |
on: | |
pull_request: | |
branches: | |
- "**" | |
push: | |
branches: | |
- "main" | |
- "v[0-9]**" | |
workflow_dispatch: | |
jobs: | |
should_run_go_test: | |
runs-on: ubuntu-latest | |
outputs: | |
should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
steps: | |
- | |
id: skip_check | |
uses: fkirc/skip-duplicate-actions@master | |
with: | |
cancel_others: "true" # workflow-runs from outdated commits will be cancelled. | |
concurrent_skipping: "same_content" | |
skip_after_successful_duplicate: "true" | |
paths: '["**/*.go", "**/*.mod", "**/*.sum"]' | |
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' | |
- | |
name: Skipping test | |
run: echo Should I skip tests? ${{ steps.skip_check.outputs.should_skip }} | |
go: | |
needs: should_run_go_test | |
if: ${{ needs.should_run_test.outputs.should_skip != 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Check out repository code | |
uses: actions/checkout@v2 | |
- | |
name: Setup Golang | |
uses: actions/[email protected] | |
with: | |
go-version: 1.18 | |
- | |
name: Display go version | |
run: go version | |
- | |
name: Get data from build cache | |
uses: actions/cache@v2 | |
with: | |
# In order: | |
# * Module download cache | |
# * Build cache (Linux) | |
# * Build cache (Mac) | |
# * Build cache (Windows) | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
~/Library/Caches/go-build | |
~\AppData\Local\go-build | |
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-${{ matrix.go-version }}- | |
- | |
name: Run all tests | |
run: make test-unit | |
e2e: | |
runs-on: ubuntu-latest | |
timeout-minutes: 25 | |
steps: | |
- | |
name: Setup Go | |
uses: actions/[email protected] | |
with: | |
go-version: 1.18 | |
- | |
name: Check out repository code | |
uses: actions/checkout@v2 | |
- | |
name: Get git diff | |
uses: technote-space/[email protected] | |
with: | |
PATTERNS: | | |
**/**.go | |
go.mod | |
go.sum | |
- | |
name: Get data from build cache | |
uses: actions/cache@v2 | |
with: | |
# In order: | |
# * Module download cache | |
# * Build cache (Linux) | |
# * Build cache (Mac) | |
# * Build cache (Windows) | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
~/Library/Caches/go-build | |
~\AppData\Local\go-build | |
key: ${{ runner.os }}-go-docker-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-docker-${{ matrix.go-version }}- | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Build e2e image | |
uses: docker/build-push-action@v3 | |
with: | |
load: true | |
context: . | |
tags: osmosis:debug | |
# Use experimental Cache backend API: https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md#cache-backend-api | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build-args: | | |
BASE_IMG_TAG=debug | |
- | |
name: Test e2e and Upgrade | |
run: make test-e2e |