diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6313b56 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f3e87d..51eeea1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,9 +7,7 @@ on: branches: [ main ] env: - # Go version we currently use to build containerd across all CI. - # Note: don't forget to update `Binaries` step, as it contains the matrix of all supported Go versions. - GO_VERSION: "1.22.8" + GOTOOLCHAIN: local permissions: # added using https://github.com/step-security/secure-workflows contents: read @@ -29,18 +27,18 @@ jobs: strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/setup-go@v7 with: - go-version: ${{ env.GO_VERSION }} + go-version: stable cache: false # see actions/setup-go#368 - uses: actions/checkout@v6 - uses: golangci/golangci-lint-action@v9 with: - version: v2.1.6 + version: v2.12 skip-cache: true args: --timeout=5m @@ -56,7 +54,7 @@ jobs: steps: - uses: actions/setup-go@v7 with: - go-version: ${{ env.GO_VERSION }} + go-version: stable cache: false # see actions/setup-go#368 - uses: actions/checkout@v6 @@ -70,10 +68,17 @@ jobs: repo-access-token: ${{ secrets.GITHUB_TOKEN }} tests: - name: 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@v6 with: @@ -81,7 +86,8 @@ jobs: - uses: actions/setup-go@v7 with: - go-version: ${{ env.GO_VERSION }} + go-version: ${{ matrix.go-version }} + go-version-file: src/github.com/containerd/log/go.mod # used when go-version is empty - name: Set env shell: bash diff --git a/go.mod b/go.mod index 9915b29..5d33950 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/containerd/log -go 1.20 +go 1.21 require github.com/sirupsen/logrus v1.9.4 diff --git a/go.sum b/go.sum index adcf7b5..9e91db8 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,12 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=