File: ci.yaml

package info (click to toggle)
golang-github-hashicorp-go-immutable-radix-v2 2.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 232 kB
  • sloc: makefile: 2
file content (26 lines) | stat: -rw-r--r-- 687 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
name: Run CI Tests
on: [push]
env:
  GO_VERSION: 1.18.4
jobs:
  run-tests:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
      - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
        with:
          go-version: ${{env.GO_VERSION}}
      - name: Run Go Vet
        run: |
          go vet ./...
      - name: Run Go Fmt
        run: |
          files=$(go fmt ./...)
          if [ -n "$files" ]; then
            echo "Please run gofmt on these files ..."
            echo "$files"
            exit 1
          fi
      - name: Run Go Test
        run: |
          go test -race -v ./...