update doc forward proxy (#15) #40
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: Go CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.21' # Set this to your Go version | |
| - name: Install dependencies | |
| run: go mod tidy | |
| - name: Run gofmt | |
| run: | | |
| # Find and list files with issues | |
| fmt_files=$(gofmt -l .) | |
| # Check if the list is empty | |
| if [ -n "$fmt_files" ]; then | |
| echo "These files are not formatted according to 'gofmt':" | |
| # Show the list | |
| echo "$fmt_files" | |
| # Fail the step | |
| exit 1 | |
| fi | |
| - name: Run go vet | |
| run: go vet ./... | |
| - name: Run unit tests | |
| run: go test ./... |