Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove vendor dir in /test #1417

Merged
merged 1 commit into from
Jun 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
37 changes: 7 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ on:
- push
- pull_request

env:
GOFLAGS: -mod=vendor
GOPROXY: off

jobs:
protos:
runs-on: 'windows-2019'
Expand Down Expand Up @@ -88,25 +84,6 @@ jobs:
}
exit $process.ExitCode
verify-test-vendor:
runs-on: 'windows-2019'
env:
GOPROXY: "https://proxy.golang.org,direct"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.17.0'
- name: Validate test modules
shell: powershell
run: |
$currentPath = (Get-Location).Path
$process = Start-Process powershell.exe -PassThru -Verb runAs -Wait -ArgumentList $currentPath/scripts/Verify-GoModules.ps1, $currentPath, "test"
if ($process.ExitCode -ne 0) {
Write-Error "Test package modules are not up to date. Please validate your go version >= this job's and run `go mod vendor` followed by `go mod tidy` in hcsshim/test directory."
}
exit $process.ExitCode
test:
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -119,17 +96,17 @@ jobs:
go-version: '^1.17.0'

- run: go test -gcflags=all=-d=checkptr -v ./... -tags admin
- run: go test -gcflags=all=-d=checkptr -v ./internal -tags admin
working-directory: test
- run: go test -gcflags=all=-d=checkptr -c ./containerd-shim-runhcs-v1/ -tags functional
- run: go test -mod=mod -gcflags=all=-d=checkptr -v ./internal -tags admin
working-directory: test
- run: go test -mod=mod -gcflags=all=-d=checkptr -c ./containerd-shim-runhcs-v1/ -tags functional
working-directory: test
- run: go test -gcflags=all=-d=checkptr -c ./cri-containerd/ -tags functional
- run: go test -mod=mod -gcflags=all=-d=checkptr -c ./cri-containerd/ -tags functional
working-directory: test
- run: go test -gcflags=all=-d=checkptr -c ./functional/ -tags functional
- run: go test -mod=mod -gcflags=all=-d=checkptr -c ./functional/ -tags functional
working-directory: test
- run: go test -gcflags=all=-d=checkptr -c ./runhcs/ -tags functional
- run: go test -mod=mod -gcflags=all=-d=checkptr -c ./runhcs/ -tags functional
working-directory: test
- run: go build -o sample-logging-driver.exe ./cri-containerd/helpers/log.go
- run: go build -mod=mod -o sample-logging-driver.exe ./cri-containerd/helpers/log.go
working-directory: test

- uses: actions/upload-artifact@v2
Expand Down
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,6 @@ certify they either authored the work themselves or otherwise have permission to
more info, as well as to make sure that you can attest to the rules listed. Our CI uses the [DCO Github app](https://github.com/apps/dco) to ensure
that all commits in a given PR are signed-off.

### Test Directory (Important to note)

This project has tried to trim some dependencies from the root Go modules file that would be cumbersome to get transitively included if this
project is being vendored/used as a library. Some of these dependencies were only being used for tests, so the /test directory in this project also has
its own go.mod file where these are now included to get around this issue. Our tests rely on the code in this project to run, so the test Go modules file
has a relative path replace directive to pull in the latest hcsshim code that the tests actually touch from this project
(which is the repo itself on your disk).

```
replace (
github.com/Microsoft/hcsshim => ../
)
```

Because of this, for most code changes you may need to run `go mod vendor` + `go mod tidy` in the /test directory in this repository, as the
CI in this project will check if the files are out of date and will fail if this is true.


## Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
Expand Down
37 changes: 0 additions & 37 deletions test/vendor/github.com/Microsoft/go-winio/README.md

This file was deleted.

Loading