File: test.yml

package info (click to toggle)
golang-github-moby-term 0.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 184 kB
  • sloc: makefile: 2
file content (49 lines) | stat: -rw-r--r-- 1,324 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Test

# Default to 'contents: read', which grants actions to read commits.
#
# If any permission is set, any permission not included in the list is
# implicitly set to "none".
#
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
  contents: read

on: [push, pull_request]

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  test:
    strategy:
      matrix:
        go: ["1.18.x", "1.22.x", "1.23.x"]
        platform: [ubuntu-latest, windows-latest, macos-latest]
    runs-on: ${{ matrix.platform }}
    steps:
    - name: Install Go ${{ matrix.go }}
      uses: actions/setup-go@v5
      with:
        go-version: ${{ matrix.go }}
    - name: Checkout code
      uses: actions/checkout@v4
    - name: Test
      run: go test -v ./...
  lint:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
      - name: go mod tidy
        run: |
          go mod tidy
          git diff --exit-code
      - name: Lint
        run: |
          docker run --rm -v ./:/go/src/github.com/moby/term -w /go/src/github.com/moby/term \
            golangci/golangci-lint:v1.62.2 golangci-lint run -v \
            -E gofmt \
            -E misspell \
            -E revive