Skip to content

feat: remove unused common js imports #16

feat: remove unused common js imports

feat: remove unused common js imports #16

Workflow file for this run

# This workflow runs all dockerfiles in this repo
name: checks
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
GO_VERSION: "1.20"
GOLANGCI_LINT_VERSION: "v1.52.2"
jobs:
matrix:
name: matrix
runs-on: ubuntu-latest
outputs:
gomod: ${{ steps.gomod.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- id: gomod
run: |
matrix=$(find . -type f -name "go.mod" -print0 | xargs -0 -n1 dirname | sort --unique | jq -R -s -c 'split("\n")[:-1]')
echo "${matrix}"
echo "::set-output name=matrix::${matrix}"
lint:
name: lint
needs: matrix
runs-on: ubuntu-latest
strategy:
matrix:
gomod: ${{ fromJson(needs.matrix.outputs.gomod) }}
env:
GOFLAGS: -mod=readonly
GOPROXY: https://proxy.golang.org
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- uses: golangci/golangci-lint-action@v3.2.0
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
working-directory: ${{ matrix.gomod }}
test:
name: test
needs: matrix
runs-on: ubuntu-latest
strategy:
matrix:
gomod: ${{ fromJson(needs.matrix.outputs.gomod) }}
env:
GOFLAGS: -mod=readonly
GOPROXY: https://proxy.golang.org
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- run: go test -v ./...