added content type to endpoint.go #42
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: Build and run all tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| go-version: [1.20.x] | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Cache go modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} | |
| restore-keys: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Get and verify dependencies | |
| run: go mod download && go mod verify | |
| - name: Go vet | |
| run: go vet . | |
| - name: Go test | |
| run: go test . |