Skip to content

Run E2E tests on PRs#460

Closed
slinkydeveloper wants to merge 4 commits intorestatedev:mainfrom
slinkydeveloper:issues/459
Closed

Run E2E tests on PRs#460
slinkydeveloper wants to merge 4 commits intorestatedev:mainfrom
slinkydeveloper:issues/459

Conversation

@slinkydeveloper
Copy link
Copy Markdown
Contributor

Fix #459

@slinkydeveloper slinkydeveloper force-pushed the issues/459 branch 4 times, most recently from 277f843 to 2e2ce6e Compare May 25, 2023 16:15
@slinkydeveloper slinkydeveloper changed the title Run E2E tests on PRs [WIP] Run E2E tests on PRs May 30, 2023
@slinkydeveloper slinkydeveloper force-pushed the issues/459 branch 3 times, most recently from 5ca7bff to 42ff567 Compare May 30, 2023 09:38
@slinkydeveloper slinkydeveloper changed the title [WIP] Run E2E tests on PRs Run E2E tests on PRs May 30, 2023
@slinkydeveloper
Copy link
Copy Markdown
Contributor Author

slinkydeveloper commented May 30, 2023

It works :) takes 40 minutes to run though :( But i guess we can iterate on it.

@slinkydeveloper
Copy link
Copy Markdown
Contributor Author

Subsequent run took only 18 minutes though!

uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
Copy link
Copy Markdown
Contributor Author

@slinkydeveloper slinkydeveloper May 30, 2023

Choose a reason for hiding this comment

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

Perhaps I can replace this with github.head_ref to reuse the cache throughout the same PR? WDYT @tillrohrmann?

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.

Uh wait perhaps it's not needed?

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.

Not sure whether I fully understand what your suggestion would change. The key is the id of the cache entry. What is being used by this job is defined via the restore-keys. With this key, we could overwrite the cache entry from the docker.yml workflow since it uses the same key. That might be an argument for using a distinct key.

Copy link
Copy Markdown
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

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

Thanks for creating this PR @slinkydeveloper. The changes look good to me. I only had a few minor comments. +1 for merging given that you've tried it out and it did the job.

uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
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.

Not sure whether I fully understand what your suggestion would change. The key is the id of the cache entry. What is being used by this job is defined via the restore-keys. With this key, we could overwrite the cache entry from the docker.yml workflow since it uses the same key. That might be an argument for using a distinct key.

with:
images: localhost/restatedev/restate

- name: Build and push Docker image
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.

We are not pushing the docker image, right?

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.

No

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.

push: false a couple of lines below

RESTATE_RUNTIME_CONTAINER: ${{ steps.build.outputs.imageID }}
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGE_READ_ACCESS_TOKEN }}
with:
arguments: -Djib.console=plain build
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.

would check enough to run all tests?

Comment on lines +177 to +185
# Upload container logs
- uses: actions/upload-artifact@v3
if: always() # Make sure this is run even when test fails
with:
name: e2e-container-logs
path: |
tests/build/test-results/*/container-logs/**
tests/build/reports/tests/**
tests/build/test-results/*/*.xml
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 think this action could not find the artifacts. At least in the run of the PR there are no uploads. Could it be that the directory e2e is missing in the paths?

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.

@tillrohrmann tillrohrmann mentioned this pull request Jun 2, 2023
@jackkleeman
Copy link
Copy Markdown
Contributor

I suggest we pause this one for now while we scope out if its possible to call e2e via a cross repo workflow call, so we don't have to duplicate any e2e workflow logic into other repos

@slinkydeveloper
Copy link
Copy Markdown
Contributor Author

Close as superseded by #481

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.

Run e2e tests on each PR

3 participants