Merge pull request #51 from xconnio/quic #151
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: deskconn router CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: 'go.mod' | |
| cache: true | |
| - run: go version | |
| - name: Pull in all Go dependencies | |
| run: go mod vendor | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: latest | |
| skip-pkg-cache: true | |
| skip-build-cache: true | |
| - name: Check that code is formatted via go fmt tool | |
| run: | | |
| if [ "$(gofmt -s -l . | grep -v vendor | wc -l)" -gt 0 ]; then | |
| exit 1; | |
| fi | |
| - name: Check that go modules are in synced state | |
| run: | | |
| go mod tidy -v | |
| if [ -n "$(git status --porcelain go.mod go.sum)" ]; then | |
| echo "Go modules are dirty or not in a good state. Please run go mod tidy" | |
| exit 1; | |
| fi | |
| - name: Run unit tests | |
| run: make test |