Skip to content

fix: removed usda:usdt pair (#96) #244

fix: removed usda:usdt pair (#96)

fix: removed usda:usdt pair (#96) #244

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches: ["main"]
workflow_dispatch:
# Allow concurrent runs on main/release branches but isolates other branches
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
cancel-in-progress: ${{ ! (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) }}
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Check for Go-related changes"
id: check_go
uses: dorny/paths-filter@v3
with:
filters: |
check_go:
- "**/*.go"
- "go.mod"
- "go.sum"
- "justfile"
- name: Set up Go
if: steps.check_go.outputs.check_go == 'true'
uses: actions/setup-go@v5
with:
go-version-file: go.mod
# cache: "The action has a built-in functionality for caching and
# restoring go modules and build outputs. It uses [actions/cache@v4]."
# - Handles go module cache (go env GOMODCACHE).
# - Handles go build cache (go env GOCACHE).
cache: true
- name: "Install just"
if: steps.check_go.outputs.check_go == 'true'
# casey/just: https://just.systems/man/en/chapter_6.html
# taiki-e/install-action: https://github.com/taiki-e/install-action
uses: taiki-e/install-action@just
- run: just test
if: steps.check_go.outputs.check_go == 'true'
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Check for Go-related changes"
id: check_go
uses: dorny/paths-filter@v3
with:
filters: |
check_go:
- "**/*.go"
- "go.mod"
- "go.sum"
- "justfile"
- name: Set up Go
if: steps.check_go.outputs.check_go == 'true'
uses: actions/setup-go@v5
with:
go-version-file: go.mod
# cache: "The action has a built-in functionality for caching and
# restoring go modules and build outputs. It uses [actions/cache@v4]."
# - Handles go module cache (go env GOMODCACHE).
# - Handles go build cache (go env GOCACHE).
cache: true
- if: steps.check_go.outputs.check_go == 'true'
run: make build
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Check for Go-related changes"
id: check_go
uses: dorny/paths-filter@v3
with:
filters: |
check_go:
- "**/*.go"
- "go.mod"
- "go.sum"
- "justfile"
- uses: actions/setup-go@v5
if: steps.check_go.outputs.check_go == 'true'
with:
go-version-file: go.mod
# cache: "The action has a built-in functionality for caching and
# restoring go modules and build outputs. It uses [actions/cache@v4]."
# - Handles go module cache (go env GOMODCACHE).
# - Handles go build cache (go env GOCACHE).
cache: true # Note that golangci-lint action already caches for us (https://github.com/golangci/golangci-lint-action#performance)
- name: golangci-lint
if: steps.check_go.outputs.check_go == 'true'
uses: golangci/golangci-lint-action@v8
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v2.6.1
# Optional: working directory, useful for monorepos
# working-directory: somedir
# Optional: golangci-lint command line arguments.
args: --fix=false
# Optional: show only new issues if it's a pull request. The default
# value is `false`.
# only-new-issues: true
# Optional: if set to true then the all caching functionality will be
# completely disabled. Takes precedence over all other caching options.
skip-cache: false
# Optional: if set to true then the action won't cache or restore ~/go/pkg.
# skip-pkg-cache: true
# Optional: if set to true then the action won't cache or restore ~/.cache/go-build.
# skip-build-cache: true