feat: migrate from libcompose to compose-go (#1547)
* feat: migrate from libcompose to compose-go libcompose has been deprecated since summer 2021 in favor of https://github.com/compose-spec/compose-go. Kompose should now be able to load all versions of compose. * chore: replace golint with staticcheck golint has been deprecated. Recommended replacement is staticcheck.
This commit is contained in:
@@ -17,19 +17,20 @@ jobs:
|
||||
steps:
|
||||
|
||||
- name: Set up Go 1.x
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ^1.16
|
||||
go-version: ^1.19
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build
|
||||
run: make bin
|
||||
|
||||
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v2.1.4
|
||||
with:
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: "kompose"
|
||||
path: "kompose"
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
name: golangci-lint
|
||||
on:
|
||||
pull_request:
|
||||
jobs:
|
||||
golangci:
|
||||
strategy:
|
||||
matrix:
|
||||
go: [1.16, 1.17]
|
||||
name: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
- uses: actions/checkout@v2
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
|
||||
version: v1.29
|
||||
args: --timeout 5m
|
||||
@@ -0,0 +1,26 @@
|
||||
name: lint
|
||||
on:
|
||||
pull_request:
|
||||
jobs:
|
||||
lint:
|
||||
strategy:
|
||||
matrix:
|
||||
go: [1.18, 1.19]
|
||||
name: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v3
|
||||
- name: "Install golang"
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
- name: "Run go vet"
|
||||
run: "go vet ./pkg/..."
|
||||
- name: "Run staticcheck"
|
||||
uses: dominikh/staticcheck-action@v1
|
||||
with:
|
||||
cache-key: "${{ matrix.go }}"
|
||||
install-go: false
|
||||
version: "latest"
|
||||
working-directory: "pkg"
|
||||
@@ -10,14 +10,14 @@ env:
|
||||
jobs:
|
||||
test:
|
||||
name: Test with ${{ matrix.go }} and CROSS_COMPILE=${{ matrix.cross_compile }}
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go: [1.16, 1.17]
|
||||
go: [1.18, 1.19]
|
||||
cross_compile: [true, false]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
- name: Run tests
|
||||
@@ -27,13 +27,13 @@ jobs:
|
||||
run: make cross
|
||||
docs:
|
||||
name: Build docs and Coveralls integration
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.16
|
||||
go-version: 1.19
|
||||
- name: Create .coverprofile for each targeted directory by re:running tests
|
||||
run: make test
|
||||
- name: Collect all .coverprofile files and save it to one file gover.coverprofile
|
||||
|
||||
Reference in New Issue
Block a user