-
Notifications
You must be signed in to change notification settings - Fork 6
100 lines (82 loc) · 2.6 KB
/
Copy pathci.yml
File metadata and controls
100 lines (82 loc) · 2.6 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
GOTOOLCHAIN: local
permissions:
contents: read
jobs:
#
# golangci-lint
#
linters:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
name: Linters
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: stable
cache: false # see actions/setup-go#368
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
with:
version: v2.13
skip-cache: true
#
# Project checks
#
project:
name: Project Checks
if: github.repository == 'containerd/log'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: stable
cache: false # see actions/setup-go#368
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: src/github.com/containerd/log
fetch-depth: 25
- uses: containerd/project-checks@d7751f3c375b8fe4a84c02a068184ee4c1f59bc4 # v1.2.2
with:
working-directory: src/github.com/containerd/log
repo-access-token: ${{ secrets.GITHUB_TOKEN }}
tests:
name: Tests / ${{ matrix.go-version || 'go.mod' }}
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
go-version:
- "" # leave empty to use go-version-file (go.mod)
- oldstable
- stable
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: src/github.com/containerd/log
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: ${{ matrix.go-version }}
go-version-file: src/github.com/containerd/log/go.mod # used when go-version is empty
cache: false # see actions/setup-go#368
- name: Set env
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- run: |
go test -v -race
working-directory: src/github.com/containerd/log