Merge pull request #51 from CoderPoet/chore/optimize-provider #189
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
name: Tests | |
on: [push, pull_request] | |
jobs: | |
resolve-modules: | |
name: resolve module | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- id: set-matrix | |
run: ./hack/resolve-modules.sh | |
lint: | |
name: lint module | |
runs-on: ubuntu-latest | |
needs: resolve-modules | |
strategy: | |
matrix: ${{ fromJson(needs.resolve-modules.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21.3 | |
- name: Lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: latest | |
working-directory: ${{ matrix.workdir }} | |
args: -E gofumpt | |
skip-pkg-cache: true | |
ut: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21.3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Unit Test | |
run: make test |