all repos

onasty @ d4ca41d

a one-time notes service

onasty/.github/workflows/golang.yml (view raw)

dependabot[bot] dependabot[bot]
49699333+dependabot[bot]@users.noreply.github.com
chore(deps): bump actions/setup-go from 5 to 6 (#224)..., 8 months 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@v5
16
17
      - name: Set up Go
18
        uses: actions/setup-go@v6
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/api/
25
26
      - name: Build mailer service
27
        run: go build -o .bin/mailer ./mailer/
28
29
      - name: Unit tests
30
        run: go test -v --short ./...
31
32
      - name: e2e tests
33
        run: go test -v ./e2e/
34
35
  lint:
36
    runs-on: ubuntu-latest
37
    steps:
38
      - uses: actions/checkout@v5
39
      - name: Read .tool-versions
40
        uses: marocchino/tool-versions-action@v1
41
        id: versions
42
43
      - name: Golangci Lint
44
        uses: golangci/golangci-lint-action@v8
45
        with:
46
          version: "v${{ steps.versions.outputs.golangci-lint }}"
47
          args: ./...