Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2.2k
ci: github actions test workflow#3365
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -3,6 +3,5 @@ | ||
| /cli/winresources/*.syso | ||
| /man/man*/ | ||
| /docs/yaml/gen/ | ||
| coverage.txt | ||
| profile.out | ||
| /vndr.log | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| name: test | ||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - 'master' | ||
| - '[0-9]+.[0-9]{2}' | ||
| tags: | ||
| - 'v*' | ||
| pull_request: | ||
| jobs: | ||
| ctn: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - | ||
| name: Checkout | ||
| uses: actions/checkout@v2 | ||
| - | ||
| name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v1 | ||
| - | ||
| name: Test | ||
| uses: docker/bake-action@v1 | ||
| with: | ||
| targets: test-coverage | ||
| - | ||
| name: Send to Codecov | ||
| uses: codecov/codecov-action@v2 | ||
| with: | ||
| file: ./build/coverage/coverage.txt | ||
| host: | ||
| runs-on: ${{ matrix.os }} | ||
| env: | ||
| GOPATH: ${{ github.workspace }} | ||
| GOBIN: ${{ github.workspace }}/bin | ||
| GO111MODULE: auto | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: | ||
| - macos-latest | ||
| # - windows-latest # FIXME: some tests are failing on the Windows runner, as well as on Appveyor since June 24, 2018: https://ci.appveyor.com/project/docker/cli/history | ||
| steps: | ||
| - | ||
| name: Prepare git | ||
| if: matrix.os == 'windows-latest' | ||
| run: | | ||
| git config --system core.autocrlf false | ||
| git config --system core.eol lf | ||
| - | ||
| name: Checkout | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| path: ${{ env.GOPATH }}/src/github.com/docker/cli | ||
| - | ||
| name: Set up Go | ||
| uses: actions/setup-go@v2 | ||
| with: | ||
| go-version: 1.16.11 | ||
| - | ||
| name: Test | ||
| run: | | ||
| go test -coverprofile=/tmp/coverage.txt $(go list ./... | grep -vE '/vendor/|/e2e/') | ||
| go tool cover -func=/tmp/coverage.txt | ||
| working-directory: ${{ env.GOPATH }}/src/github.com/docker/cli | ||
| shell: bash | ||
| - | ||
| name: Send to Codecov | ||
| uses: codecov/codecov-action@v2 | ||
| with: | ||
| file: /tmp/coverage.txt | ||
| working-directory: ${{ env.GOPATH }}/src/github.com/docker/cli | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -14,6 +14,5 @@ Thumbs.db | ||
| /man/man5/ | ||
| /man/man8/ | ||
| /docs/yaml/gen/ | ||
| coverage.txt | ||
| profile.out | ||
| /vndr.log | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -245,6 +245,8 @@ func TestValidateContextDirectoryWithOneFileExcludes(t *testing.T) { | ||
| func createTestTempDir(t *testing.T, prefix string) (string, func()) { | ||
| path, err := ioutil.TempDir("", prefix) | ||
| assert.NilError(t, err) | ||
| path, err = filepath.EvalSymlinks(path) | ||
| assert.NilError(t, err) | ||
Comment on lines
+248
to
+249
| ||
| return path, func() { assert.NilError(t, os.RemoveAll(path)) } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix the EOL issues on Windows runners, we need to disable autocrlf. See actions/checkout#135 for more info.