feat: remove unused common js imports #17
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
# This workflow runs all dockerfiles in this repo | |
name: Lint and Test | |
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: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
matrix: | |
name: matrix | |
runs-on: ubuntu-latest | |
outputs: | |
gomod: ${{ steps.gomod.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
- 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@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- uses: golangci/golangci-lint-action@v4 | |
with: | |
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@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- run: go test -v ./... | |