Skip to content

Avoids repetition by testing CentOS after Ubuntu#383

Merged
codefromthecrypt merged 3 commits intomasterfrom
less-work
Oct 1, 2021
Merged

Avoids repetition by testing CentOS after Ubuntu#383
codefromthecrypt merged 3 commits intomasterfrom
less-work

Conversation

@codefromthecrypt
Copy link
Copy Markdown
Contributor

This is less copy/pasta

Signed-off-by: Adrian Cole <adrian@tetrate.io>
@codefromthecrypt
Copy link
Copy Markdown
Contributor Author

A side effect is longer runtime of the main build to run the e2e again sequentially. We can see how long it takes...

Signed-off-by: Adrian Cole <adrian@tetrate.io>
@codefromthecrypt
Copy link
Copy Markdown
Contributor Author

hmm 45s I could go either way on this. The pro is less config replicated, the con is the long pole is longer (3m until PR feedback completes)

Comment thread .github/workflows/commit.yaml Outdated
Signed-off-by: Adrian Cole <adrian@tetrate.io>
@codefromthecrypt
Copy link
Copy Markdown
Contributor Author

38s longer.. 15s is downloading the centos image. not sure we can make this much better.

@mathetake WDYT? should we do this and be 38s longer or leave it and be 35 lines longer?

@codefromthecrypt
Copy link
Copy Markdown
Contributor Author

actually total duration isn't longer as windows is slower than the now slower ubuntu :D


- name: "Run e2e tests using the `func-e` binary (CentOS)"
if: runner.os == 'Linux'
run: docker run -v $HOME/.func-e:/root/.func-e -v $PWD:/func-e --rm ${CENTOS_IMAGE} -c "cd /func-e; make -o ${E2E_FUNC_E_PATH} e2e"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we could use: docker://ghcr.io/... to avoid docker run -v manual mounts etc...?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh that would result in the same maybe so nvm 😄

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep plus, you can paste this into your laptop and it probably works :D A follow-up change will use the same to test centos+arm64

Copy link
Copy Markdown
Contributor

@mathetake mathetake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally I like this better than tens of lines longer :D

@codefromthecrypt
Copy link
Copy Markdown
Contributor Author

thanks for thinking about it @mathetake

@codefromthecrypt codefromthecrypt merged commit 8156b0a into master Oct 1, 2021
@codefromthecrypt codefromthecrypt deleted the less-work branch October 1, 2021 05:24
@codefromthecrypt
Copy link
Copy Markdown
Contributor Author

master now does the same in travis, running e2e back to back ubuntu then centos, using arm64graviton and done in <2.5minutes

--- a/.travis.yml
+++ b/.travis.yml
@@ -13,7 +13,6 @@ cache:
   directories: # ~/.func-e/versions is cached so that we only re-download once: for TestFuncEInstall
     - $HOME/.func-e/versions
     - $HOME/go/pkg/mod
-    - $HOME/go/bin/*-v*
 
 git:
   depth: false  # TRAVIS_COMMIT_RANGE requires full commit history.
@@ -28,4 +27,13 @@ before_install: |  # Prevent test build of a documentation or GitHub Actions onl
   fi
   make check || travis_terminate 1
 
-script: make e2e
+env:  # CENTOS_IMAGE was built by internal-images.yaml; E2E_FUNC_E_PATH was built via `make e2e`
+  global:
+    - CENTOS_IMAGE=ghcr.io/tetratelabs/func-e-internal:centos8
+    - E2E_FUNC_E_PATH=build/func-e_linux_arm64/func-e
+
+script:
+  # Run e2e tests using the `func-e` binary (Ubuntu)
+  - make e2e
+  # Run e2e tests using the `func-e` binary (CentOS)
+  - docker run -v $HOME/.func-e:/root/.func-e -v $PWD:/func-e --rm ${CENTOS_IMAGE} -c "cd /func-e; make -o ${E2E_FUNC_E_PATH} e2e"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants