12
12
jobs :
13
13
lint :
14
14
name : Lint
15
- runs-on : ubuntu-20 .04
15
+ runs-on : ubuntu-22 .04
16
16
steps :
17
17
- name : Check out code
18
18
uses : actions/checkout@v4
@@ -30,10 +30,112 @@ jobs:
30
30
31
31
tests :
32
32
name : Tests
33
- runs-on : ubuntu-20.04
33
+ runs-on : ${{ matrix.os }}
34
34
strategy :
35
35
matrix :
36
- go_versions : [ '1.20', '1.21', '1.22' ]
36
+ os : [ubuntu-22.04, windows-2022, macos-12, macos-14]
37
+ go : [ '1.20', '1.21', '1.22' ]
38
+ exclude :
39
+ # Only latest Go version for Windows and MacOS.
40
+ - os : windows-2022
41
+ go : ' 1.20'
42
+ - os : windows-2022
43
+ go : ' 1.21'
44
+ - os : macos-12
45
+ go : ' 1.20'
46
+ - os : macos-12
47
+ go : ' 1.21'
48
+ - os : macos-14
49
+ go : ' 1.20'
50
+ - os : macos-14
51
+ go : ' 1.21'
52
+ # Exclude latest Go version for Ubuntu as Coverage uses it.
53
+ - os : ubuntu-22.04
54
+ go : ' 1.22'
37
55
fail-fast : false
56
+ steps :
57
+ - name : Setup go
58
+ uses : actions/setup-go@v5
59
+ with :
60
+ cache : true
61
+ go-version : ${{ matrix.go }}
62
+
63
+ - name : Check out code
64
+ uses : actions/checkout@v4
65
+
66
+ - name : Run go test
67
+ run : go test -race ./...
68
+
69
+ cover :
70
+ name : Coverage
71
+ runs-on : ubuntu-22.04
72
+
73
+ env :
74
+ CGO_ENABLED : 1
38
75
steps :
39
76
- uses : actions/checkout@v4
77
+ with :
78
+ fetch-depth : 0
79
+
80
+ - name : Set up Go
81
+ uses : actions/setup-go@v5
82
+ with :
83
+ cache : true
84
+ go-version : 1.22
85
+
86
+ - name : Test and write coverage profile
87
+ run : go test -coverprofile=coverage.txt -covermode=atomic ./...
88
+
89
+ - name : Upload coverage results to Codecov
90
+ uses : codecov/codecov-action@v4
91
+ with :
92
+ token : ${{ secrets.CODECOV_TOKEN }}
93
+ slug : nspcc-dev/xk6-neofs
94
+ fail_ci_if_error : true
95
+ files : ./coverage.txt
96
+ verbose : true
97
+
98
+ codeql :
99
+ name : CodeQL
100
+ runs-on : ubuntu-latest
101
+
102
+ strategy :
103
+ fail-fast : false
104
+ matrix :
105
+ language : [ 'go' ]
106
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
107
+ # Learn more:
108
+ # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
109
+
110
+ steps :
111
+ - name : Checkout repository
112
+ uses : actions/checkout@v4
113
+
114
+ # Initializes the CodeQL tools for scanning.
115
+ - name : Initialize CodeQL
116
+ uses : github/codeql-action/init@v2
117
+ with :
118
+ languages : ${{ matrix.language }}
119
+ # If you wish to specify custom queries, you can do so here or in a config file.
120
+ # By default, queries listed here will override any specified in a config file.
121
+ # Prefix the list here with "+" to use these queries and those in the config file.
122
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
123
+
124
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
125
+ # If this step fails, then you should remove it and run the build manually (see below)
126
+ - name : Autobuild
127
+ uses : github/codeql-action/autobuild@v2
128
+
129
+ # ℹ️ Command-line programs to run using the OS shell.
130
+ # 📚 https://git.io/JvXDl
131
+
132
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
133
+ # and modify them (or add more) to build your code if your project
134
+ # uses a compiled language
135
+
136
+ # - run: |
137
+ # make bootstrap
138
+ # make release
139
+
140
+ - name : Perform CodeQL Analysis
141
+ uses : github/codeql-action/analyze@v2
0 commit comments