onasty/.github/workflows/golang.yml (view raw)
Smirnov Oleksandr
Smirnov Oleksandr
ss2316544@gmail.com feat: keep metadate on note removal (#96)..., 1 year ago
ss2316544@gmail.com feat: keep metadate on note removal (#96)..., 1 year ago
| 1 | name: golang |
| 2 | |
| 3 | on: |
| 4 | workflow_dispatch: |
| 5 | push: |
| 6 | branches: [main] |
| 7 | paths: ["**.go", "go.mod", "go.sum"] |
| 8 | pull_request: |
| 9 | paths: ["**.go", "go.mod", "go.sum"] |
| 10 | |
| 11 | jobs: |
| 12 | release: |
| 13 | runs-on: ubuntu-latest |
| 14 | steps: |
| 15 | - uses: actions/checkout@v4 |
| 16 | |
| 17 | - name: Set up Go |
| 18 | uses: actions/setup-go@v5 |
| 19 | with: |
| 20 | go-version-file: go.mod |
| 21 | cache-dependency-path: go.mod |
| 22 | |
| 23 | - name: Build API |
| 24 | run: go build -o .bin/onasty ./cmd/server/ |
| 25 | |
| 26 | - name: Unit tests |
| 27 | run: go test -v --short ./... |
| 28 | |
| 29 | - name: e2e tests |
| 30 | run: go test -v ./e2e/ |
| 31 | |
| 32 | lint: |
| 33 | runs-on: ubuntu-latest |
| 34 | steps: |
| 35 | - uses: actions/checkout@v4 |
| 36 | - name: Golangci Lint |
| 37 | uses: golangci/golangci-lint-action@v7 |
| 38 | with: |
| 39 | version: latest |
| 40 | args: ./... |