File: ci.yml

package info (click to toggle)
golang-github-containerd-console 1.0.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 176 kB
  • sloc: makefile: 2
file content (53 lines) | stat: -rw-r--r-- 1,190 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
50
51
52
53
name: CI

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:

  build:
    name: Console CI
    runs-on: ubuntu-22.04
    timeout-minutes: 5
    steps:

    - name: Set up Go
      uses: actions/setup-go@v3
      with:
        go-version: 1.19.x
      id: go

    - name: Setup Go binary path
      shell: bash
      run: |
        echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
        echo "${{ github.workspace }}/bin" >> $GITHUB_PATH

    - name: Check out code
      uses: actions/checkout@v3
      with:
        path: src/github.com/containerd/console
        fetch-depth: 25

    - name: Install dependencies
      run: |
        go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1

    - name: Project Checks
      uses: containerd/project-checks@v1.2.2
      with:
        working-directory: src/github.com/containerd/console

    - name: Go Linting
      run: GOGC=75 golangci-lint run
      working-directory: src/github.com/containerd/console

    - name: Build & Test
      working-directory: src/github.com/containerd/console
      run: |
        go test -race
        GOOS=openbsd go build
        GOOS=windows go build