Skip to content

Commit

Permalink
Linting_tests (#34)
Browse files Browse the repository at this point in the history
* mounting a volume to buildkit

* squash last 12 commits

* remove toml

* remove volume

* retrigger tests

* making import export dynamic

* set the startup flag

* Add tests support for startup & refactoring

* testing

* testing

* testing

* testing

* testing

* testing

* testing

* testing

* testing

* testing

* was sh all along

* fix startup string to bool

* removing ts for testing as building it alone fails

* runtime error while building c

* now go failed

* rust failed

* just py,rb,node

* just py,rb,node

* trigger all the tests

* trigger all the tests

* trigger all the tests

* trigger all the tests

* trigger all the tests

* trigger all the tests startup with cli, i am soooo dumb

* i think this might work now

* final testing

* retrigger

* what happens if i trigger tests with only runtime build

* retrigger with backtrace added

* add diff registry for run time/dev to isolate and retrigger tests with both open

* disable backtrace like before, this test should fail

* triggering only the startup tests with backtrace enabled

* enable backtrace,both issues resolved, very demure, very mindful

* cleanup and enable all tests

* only add startup-rootless and startup-client as tests

* Seperated tests

* linting tests

* fix lint
  • Loading branch information
ashpect authored Aug 27, 2024
1 parent ba486a5 commit 697eba9
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 19 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: golangci-lint
on:
push:
branches:
- main
- master
pull_request:

permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
pull-requests: read

jobs:
golangci:
strategy:
matrix:
go: [stable]
os: [ubuntu-latest, macos-latest, windows-latest]
name: lint
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
38 changes: 19 additions & 19 deletions pkg/staging/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,22 @@ func copy(src llb.State, srcPath string, dest llb.State, destPath string) llb.St
}))
}

func copyForStates(src llb.State, dst llb.State, srcpaths []string, dstpath string) llb.State {
return dst.With(
copyMultiple(src, srcpaths, dstpath),
)
}

func copyMultiple(src llb.State, srcPaths []string, destPath string) llb.StateOption {
var stateOptions []llb.StateOption
for _, srcPath := range srcPaths {
stateOptions = append(stateOptions, copyFrom(src, srcPath, destPath))
}

return func(s llb.State) llb.State {
for _, stateOption := range stateOptions {
s = stateOption(s)
}
return s
}
}
// Functions which might be useful later, left as comments here :
// func copyForStates(src llb.State, dst llb.State, srcpaths []string, dstpath string) llb.State {
// return dst.With(
// copyMultiple(src, srcpaths, dstpath),
// )
// }

// func copyMultiple(src llb.State, srcPaths []string, destPath string) llb.StateOption {
// var stateOptions []llb.StateOption
// for _, srcPath := range srcPaths {
// stateOptions = append(stateOptions, copyFrom(src, srcPath, destPath))
// }
// return func(s llb.State) llb.State {
// for _, stateOption := range stateOptions {
// s = stateOption(s)
// }
// return s
// }
// }

0 comments on commit 697eba9

Please sign in to comment.