set json tag in struct instead url #196
Workflow file for this run
This file contains hidden or 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: ci | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| tags-ignore: | |
| - '*.*' | |
| pull_request: | |
| env: | |
| RETAILCRM_URL: https://test.retailcrm.pro | |
| RETAILCRM_KEY: key | |
| jobs: | |
| golangci: | |
| name: lint | |
| if: ${{ github.event_name == 'pull_request' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v2 | |
| - name: Set up Go 1.23 | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: '1.23' | |
| - name: Get dependencies | |
| run: | | |
| go mod tidy | |
| cp .env.dist .env | |
| - name: Lint code with golangci-lint | |
| uses: golangci/golangci-lint-action@v3 | |
| with: | |
| version: v1.62.2 | |
| only-new-issues: true | |
| skip-pkg-cache: true | |
| args: --build-tags=testutils | |
| tests: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go-version: ['1.19', '1.20', '1.21', '1.22', '1.23', 'stable'] | |
| include: | |
| - go-version: '1.23' | |
| coverage: 1 | |
| steps: | |
| - name: Set up Go ${{ matrix.go-version }} | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v2 | |
| - name: Get dependencies | |
| run: | | |
| go mod tidy | |
| cp .env.dist .env | |
| - name: Tests | |
| env: | |
| COVERAGE: ${{ matrix.coverage }} | |
| if: env.COVERAGE != 1 | |
| run: | | |
| go install gotest.tools/gotestsum@latest | |
| gotestsum --format testdox ./... -tags=testutils -v -cpu 2 -timeout 60s -race | |
| - name: Tests with coverage | |
| env: | |
| COVERAGE: ${{ matrix.coverage }} | |
| if: env.COVERAGE == 1 | |
| run: | | |
| go install gotest.tools/gotestsum@latest | |
| gotestsum --format testdox ./... -tags=testutils -v -cpu 2 -timeout 60s -race -cover -coverprofile=coverage.txt -covermode=atomic "$d" | |
| - name: Coverage | |
| env: | |
| COVERAGE: ${{ matrix.coverage }} | |
| if: env.COVERAGE == 1 | |
| run: | | |
| go install github.com/axw/gocov/gocov@latest | |
| gocov convert ./coverage.txt | gocov report | |
| bash <(curl -s https://codecov.io/bash) |