Commit Graph

117 Commits

Author SHA1 Message Date
Joana Hrotko 34b11c4f4f Add test summary for test jobs in ci
Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
2024-03-01 13:32:04 +01:00
Nicolas De Loof 74cc091225 github.com/golang/mock is deprecated
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-12-13 14:47:39 +01:00
Ulysses Souza 8ea7c9e0d2 Make it context aware and add test skipping options
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2023-11-15 21:09:50 +01:00
Guillaume Lours 14b43c1a93
remove cucumber tests as we haven't added new ones for a while
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-10-10 09:57:25 +02:00
Djordje Lukic 78f3361921
ci: enable verbose output for e2e tests (#11045)
It's easier to see that something is happening.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-09-27 16:29:54 +00:00
Milas Bowman e63ab14b1e
ci: merge Go coverage reports before upload (#10666)
Attempting to fix the state of codecov action checks right now,
which are behaving very erratically.

Using the new functionality in Go 1.20 to merge multiple reports,
so now the unit & E2E coverage data reports are stored as artifacts
and then downloaded, merged, and finally uploaded to codecov as a
new job.

Additionally, add a `codecov.yml` config and try to turn down the
aggressiveness of it for CI checks.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-06-08 14:58:21 -04:00
Guillaume Lours 83ad5e97b7 add Windows drive prefix to temp dir usage in the doc generation task
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-05-31 10:18:23 +02:00
Milas Bowman 3b85cd2fa9 test: fix e2e commands on Windows
Instead of trying to make this work nicely cross-platform,
just push the Coverage logic into the GitHub Actions job,
as that's really where we care about it.

(It's surprisingly difficult to make this nicely portable;
to make PowerShell not error out if the path does not exist
you have to ignore ALL errors and the way that env vars are
passed to processes is not the same.)

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-03-24 11:50:05 -04:00
Tianon Gravi fc4d2dfdd8 Remove "-s" from LDFLAGS
While this stripping does decrease the binary size by some amount, it also removes the ability for `govulncheck` (https://go.dev/blog/vuln) to scan the binary for actual uses of vulnerable functions, requiring the user to clone the code locally and hope they're testing against the same version of the stdlib, etc that the binary was built with.  If we stop passing `-s`, then we can then run `govulncheck` on the binary directly (making it easier to flag both false positives in CVE scans _and_ actual issues worth looking into).

Here's an example of the output on a freshly built binary with this change:

```console
$ govulncheck ./bin/build/docker-compose
govulncheck is an experimental tool. Share feedback at https://go.dev/s/govulncheck-feedback.

Using govulncheck@v0.0.0 with
vulnerability data from https://vuln.go.dev (last modified 27 Feb 23 16:29 UTC).

Scanning your binary for known vulnerabilities...
No vulnerabilities found.
```

Compared to the 1.16.0 release binary:

```console
$ govulncheck ./docker-compose
go: downloading golang.org/x/vuln v0.0.0-20230224180816-edec1fb0a9c7
govulncheck is an experimental tool. Share feedback at https://go.dev/s/govulncheck-feedback.

Using govulncheck@v0.0.0 with
vulnerability data from https://vuln.go.dev (last modified 27 Feb 23 16:29 UTC).

Scanning your binary for known vulnerabilities...
govulncheck: vulncheck.Binary: reading go:func.*: no symbol "go:func.*"
```

It's not 100% apples-to-apples, but the size difference between these binaries is ~46MiB for the 1.16.0 release and ~52MiB for the binary I built from this commit.

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2023-03-13 08:16:48 +00:00
Nicolas De Loof 85ddfde5d6 use go 1.20 -cover support
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-03-10 16:54:39 +00:00
Nicolas De Loof 7a42ba7eec use CGO to enable fsevent on OSX
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-10 17:24:48 +01:00
Milas Bowman 5b043c4d59 ci: don't use `-race` on Windows
I misunderstood the cause of the symptom in #10261 - thought that
we'd explicitly turned off CGO for Windows with some of the build
changes recently, but we don't even have `gcc` on the CI node, so
it's actually just `-race` entirely that's the trouble.

For right now, going the easy route and disabling it. We can look
at getting a C toolchain on the Windows machine later.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-02-10 15:51:48 +01:00
Milas Bowman 15f7104cd3 ci: use CGO for tests to enable race detector
```
go: -race requires cgo; enable cgo by setting CGO_ENABLED=1
```

We're explicitly using CGO on macOS now for FSEvents support and
purposefully NOT using CGO on other platforms since we don't need
it.

The race detector (`-race`) requires it, however, so for the e2e
make task, it should alway be on.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-02-09 13:29:51 -05:00
Laura Brehm 4ad87463c5 Add 🥒 GHA workflow
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-01-11 14:13:10 +01:00
Ulysses Souza 0c1979979f Remove unused kube tag
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2023-01-09 14:52:11 +01:00
Guillaume Lours 86a648bd51
e2e tests display Compose version used to run the test
currently the version displayed is the one installed and not the one use for the tests

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-12-21 18:38:24 +01:00
Guillaume Lours 27a3241934
rely on CI timeout
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-12-21 16:11:56 +01:00
Guillaume Lours cc247fdb84 remove go.* from e2e tests directory
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-12-08 19:06:22 +01:00
Milas Bowman 053f20edab
port: improve error-handling if port not found (#10039)
This method looked slightly incomplete. If the port wasn't found,
it'd return `err`, but that was always `nil`, so we'd print out
`:0`.

Now, we construct a nice error message with the targeted port and
the ones we found.

The `--protocol` flag is also now case-insensitive to prevent any
weirdness/confusion there.

Co-authored-by: Nick Sieger <nicksieger@gmail.com>
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-12-05 22:11:45 +00:00
Laura Brehm 7424a3d3c1
Fix Makefile target `validate-go-mod` to only run correct bakefile target
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-10-18 15:38:41 +02:00
Ulysses Souza 91eae4f035 Add Codecov
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-10-17 15:32:51 +02:00
Laura Brehm c6109b2e5c
Add Makefile, buildx target to ensure root and e2e go.mod are kept in sync
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-27 02:35:57 +02:00
Laura Brehm 0dc64723c9
Restore `-s` in `uname` OS detection logic in `Makefile`
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-21 10:19:00 -04:00
Laura Brehm 6bc50cb457
Rework Makefile for better Windows support
Fixes error when attempting to run `uname` on Windows, and add `.exe` to built binary on `make` if on Windows

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-20 11:33:31 -04:00
CrazyMax 69651136cf
Makefile: mutualize local and Dockerfile build opts (#9776)
Ensure that everything works nicely for `docker-ce-packaging`
as well as local development.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-08-26 16:06:24 -04:00
CrazyMax 5ec20296e4
Better sandboxed workflow and enhanced cross compilation
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-08-12 15:05:58 +02:00
Sebastiaan van Stijn 92f32b5c79
ci: use latest stable dockerfile syntax & rename docs Dockerfile (#9711)
* update dockerfiles to use latest stable syntax

Some Dockerfiles were pinned to a minor release, which meant they
wouldn't be updated to get the latest stable syntax (and fixes),
and one Dockerfile used the "labs" variant to use the HEREDOC syntax,
which has now been promoted to the stable syntax.

* docs: rename Dockerfile

There's no other Dockerfiles in the same path, so the "docs"
prefix was redundant.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-03 16:36:13 -04:00
Guillaume Lours 978b2f8265
add new targets to build Compose binary before running e2e tests
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-07-04 15:53:08 +02:00
Nick Sieger 3599fc8533
mocks: create mocks for compose api.Service
Signed-off-by: Nick Sieger <nick@nicksieger.com>
2022-06-07 17:09:06 -05:00
Ulysses Souza e51fd0a844 Fix local run of `make e2e-compose-standalone`
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-05-20 21:31:16 +02:00
Randy Fay 97d46a14ef Fix problems with ddev e2e test and minor cleanup, add tmate (#27)
* Add tmate for debugging
* Use -parallel=1 for standaone tests

Signed-off-by: Randy Fay <randy@randyfay.com>
2022-05-19 14:14:03 +02:00
Ulysses Souza a5a1c5f2f1 Add ddev's e2e test
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-05-19 14:14:03 +02:00
Guillaume Lours be187bae64 use a temp directory to generate doc to be sure working tree is clean
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-03-18 10:42:05 +01:00
Guillaume Lours bf26cbd498 contenairized documetation generation
add docs validation (using same process a BuildX project)

Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-03-18 10:42:05 +01:00
Nicolas De Loof 283f7a1ec5 Bump buildx to v0.8.0
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-03-11 14:05:55 +01:00
Ulysses Souza 8ae8d99528 Use build tags for selecting e2e test mode
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-12-09 10:52:18 +01:00
Nicolas De Loof 1ae9b3cb5d
move compose-cli code into docker/compose/v2
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-08-31 19:09:19 +02:00
Nicolas De Loof fb73dd58d9 Move compose e2e tests into pkg
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-28 08:47:58 +02:00
Nicolas De Loof 3aaec6a554
split compose-cli "docker" and composeV2 cli-plugin release processes
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-05-27 12:46:39 +02:00
Guillaume Tardif 66f64d9875 Add make install to symlink cli from `make cli`
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-02-22 15:27:11 +01:00
Ulysses Souza 18900cfcd0 Use gotestsum to make FAILURES more visible
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-02-15 18:17:31 -03:00
Guillaume Tardif 95d21fa768 First kube e2e. Adapted context create kubernetes command to allow non interactive mode.
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-02-02 16:01:57 +01:00
Guillaume Tardif dfc8ded216 ACI timeout moved from 10 to 15 mins
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-02-01 09:48:30 +01:00
Guillaume Tardif ecdc170938 CI build, lint & test tube backend.
Fixed some tests, let some failing test still fail, to be fixed

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-26 18:09:29 +01:00
aiordache 50792c4621 Add Kubernetes backend
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-01-20 16:55:08 +01:00
Guillaume Tardif dcd1e30f6a Fix protos target to update new protos folder
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-19 16:48:54 +01:00
Guillaume Tardif 46935b0300 Move tests to each backend folder
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-19 15:25:26 +01:00
Guillaume Tardif aca816d5d6 Remove example backend.
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-19 11:29:48 +01:00
Guillaume Tardif f8c750277f Do not run compose local e2e tests on windows GHA nodes for now (buildkit failing with `failed to mount C:\ProgramData\docker\tmp\buildkit-mount370086869: [{Type:bind Source:C:\ProgramData\docker\windowsfilter\y3952h88q6ikevun9li41hjcb Options:[rbind ro]}]: invalid windows mount type: 'bind’`).
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-15 16:21:42 +01:00
Guillaume Tardif 6d34f28beb Ensure local compose E2E are run in CI.
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-15 15:24:02 +01:00