Skip to content

Commit 3abe029

Browse files
authored
Merge pull request #1 from containerd/add-common-files
Add common files
2 parents 1a36dc0 + 78f3494 commit 3abe029

File tree

4 files changed

+141
-0
lines changed

4 files changed

+141
-0
lines changed

.github/workflows/ci.yml

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
env:
10+
# Go version we currently use to build containerd across all CI.
11+
# Note: don't forget to update `Binaries` step, as it contains the matrix of all supported Go versions.
12+
GO_VERSION: "1.21.0"
13+
14+
permissions: # added using https://github.com/step-security/secure-workflows
15+
contents: read
16+
17+
jobs:
18+
19+
#
20+
# golangci-lint
21+
#
22+
linters:
23+
permissions:
24+
contents: read # for actions/checkout to fetch code
25+
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
26+
name: Linters
27+
runs-on: ${{ matrix.os }}
28+
timeout-minutes: 10
29+
30+
strategy:
31+
matrix:
32+
os: [ubuntu-22.04, macos-12, windows-2022]
33+
34+
steps:
35+
- uses: actions/setup-go@v4
36+
with:
37+
go-version: ${{ env.GO_VERSION }}
38+
cache: false # see actions/setup-go#368
39+
40+
- uses: actions/checkout@v3
41+
- uses: golangci/golangci-lint-action@v3
42+
with:
43+
version: v1.52.2
44+
skip-cache: true
45+
args: --timeout=5m
46+
47+
#
48+
# Project checks
49+
#
50+
project:
51+
name: Project Checks
52+
if: github.repository == 'containerd/errdefs'
53+
runs-on: ubuntu-22.04
54+
timeout-minutes: 5
55+
56+
steps:
57+
- uses: actions/setup-go@v4
58+
with:
59+
go-version: ${{ env.GO_VERSION }}
60+
cache: false # see actions/setup-go#368
61+
62+
- uses: actions/checkout@v3
63+
with:
64+
path: src/github.com/containerd/errdefs
65+
fetch-depth: 25
66+
67+
- uses: containerd/project-checks@v1.1.0
68+
with:
69+
working-directory: src/github.com/containerd/errdefs
70+
repo-access-token: ${{ secrets.GITHUB_TOKEN }}
71+
72+
tests:
73+
name: Tests
74+
runs-on: ${{ matrix.os }}
75+
timeout-minutes: 5
76+
77+
strategy:
78+
matrix:
79+
os: [ubuntu-22.04, macos-12, windows-2022]
80+
81+
steps:
82+
- uses: actions/checkout@v2
83+
with:
84+
path: src/github.com/containerd/errdefs
85+
86+
- uses: actions/setup-go@v2
87+
with:
88+
go-version: ${{ env.GO_VERSION }}
89+
90+
- name: Set env
91+
shell: bash
92+
run: |
93+
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
94+
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
95+
96+
- run: |
97+
go test -v -race
98+
working-directory: src/github.com/containerd/errdefs

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# errdefs
2+
3+
A Go package for defining and checking common containerd errors.
4+
5+
## Project details
6+
7+
**errdefs** is a containerd sub-project, licensed under the [Apache 2.0 license](./LICENSE).
8+
As a containerd sub-project, you will find the:
9+
* [Project governance](https://github.com/containerd/project/blob/main/GOVERNANCE.md),
10+
* [Maintainers](https://github.com/containerd/project/blob/main/MAINTAINERS),
11+
* and [Contributing guidelines](https://github.com/containerd/project/blob/main/CONTRIBUTING.md)
12+
13+
information in our [`containerd/project`](https://github.com/containerd/project) repository.

go.mod

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module github.com/containerd/errdefs
2+
3+
go 1.20
4+
5+
require google.golang.org/grpc v1.58.3
6+
7+
require (
8+
github.com/golang/protobuf v1.5.3 // indirect
9+
golang.org/x/sys v0.13.0 // indirect
10+
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 // indirect
11+
google.golang.org/protobuf v1.31.0 // indirect
12+
)

go.sum

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
2+
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
3+
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
4+
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
5+
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
6+
golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50=
7+
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
8+
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
9+
golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4=
10+
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
11+
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 h1:6GQBEOdGkX6MMTLT9V+TjtIRZCw9VPD5Z+yHY9wMgS0=
12+
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY=
13+
google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ=
14+
google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
15+
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
16+
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
17+
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
18+
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=

0 commit comments

Comments
 (0)