-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
E2E Integration test environment setup #746
Merged
Merged
Changes from 8 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
f11f10f
Add playwright to dev requirements
pavish 226c4a6
Set base docker image to a temp custom prebuilt image with ubuntu+pyt…
pavish 668e67c
Set container names in docker compose
pavish 88488a0
Remove playwright from requirements file
pavish 71817c0
Fix container name in documents and tests
pavish 07cd5b8
Merge branch 'master' of https://github.com/centerofci/mathesar into …
pavish 007f883
Github action to run e2e tests
pavish 608e452
Sleep for 60 seconds to wait for server to be up, handle migrations
pavish bb6b7f0
Merge branch 'master' into integ_test_playwright_python
pavish 3382926
Skip confirmation during db creation in github actions
pavish 11bf8fa
Log page content to debug failing of test cases in GH workflow
pavish deb7f46
Record video artifacts to help debug failing tests
pavish 5efcfe0
Merge branch 'master' into integ_test_playwright_python
pavish edd7854
Print DB name in installation message.
kgodey 94e7827
Remove copy of env file.
kgodey 2cb167b
Change cache key.
kgodey 063cb7a
Revert "Remove copy of env file."
kgodey 12ef48d
Update status: waiting issues automatically
kgodey e772b0a
Merge branch 'fix_install_script' of https://github.com/centerofci/ma…
pavish 4c67223
Merge branch 'master' into integ_test_playwright_python
kgodey 954901c
Merge branch 'master' of https://github.com/centerofci/mathesar into …
pavish 49eb096
Merge branch 'master' of https://github.com/centerofci/mathesar into …
pavish a710cfc
Merge branch 'master' of https://github.com/centerofci/mathesar into …
pavish 2a07f16
Merge branch 'master' of https://github.com/centerofci/mathesar into …
pavish 64352b8
Merge branch 'master' of https://github.com/centerofci/mathesar into …
pavish 649e904
Merge branch 'master' of https://github.com/centerofci/mathesar into …
pavish f26ca02
Reverting dockerfile changes
pavish 6395b19
Run pytest on mathesar and db modules
pavish ff3e5cf
Dockerfile for integration tests
pavish 62439b2
Use integ test dockerfile for running e2e tests
pavish b7657c3
Merge branch 'master' of https://github.com/centerofci/mathesar into …
pavish ba894a2
Specify different path for artifacts for each workflow
pavish 04b970b
Documentation for running E2E tests
pavish 609dd49
chore(docs): update TOC
pavish 1db88d1
Add license of python3.9 dockerfile used as reference
pavish cfa53d9
Merge branch 'integ_test_playwright_python' of https://github.com/cen…
pavish e5bfc70
Removing conflicting step to set waiting status on issues
pavish File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Run E2E integration tests | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
# We only want to run on external PRs, since internal PRs are covered by "push" | ||
# This prevents this from running twice on internal PRs | ||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# In this step, this action saves a list of existing images, | ||
# the cache is created without them in the post run. | ||
# It also restores the cache if it exists. | ||
- uses: satackey/action-docker-layer-caching@v0.0.11 | ||
# Ignore the failure of a step and avoid terminating the job. | ||
continue-on-error: true | ||
with: | ||
key: mathesar-docker-cache-integ-tests-{hash} | ||
restore-keys: | | ||
mathesar-docker-cache-integ-tests- | ||
|
||
- name: Copy env file | ||
run: cp .env.example .env | ||
|
||
# The code is checked out under uid 1001 - reset this to 1000 for the | ||
# container to run tests successfully | ||
- name: Fix permissions | ||
run: sudo chown -R 1000:1000 . | ||
|
||
- name: Build the stack | ||
run: docker-compose up --build -d | ||
|
||
- name: Sleep for 60 seconds | ||
run: sleep 60s | ||
shell: bash | ||
|
||
# TODO: This needs to be handled inside the tests | ||
- name: Run migrations | ||
run: docker exec mathesar_service python manage.py migrate | ||
|
||
- name: Run type installation | ||
run: docker exec mathesar_service python install.py | ||
|
||
- name: Run integ tests with pytest | ||
run: docker exec mathesar_service pytest --browser chromium --browser webkit --browser firefox tests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
def test_base_page(page): | ||
page.goto('http://localhost:8000') | ||
assert page.inner_text('h1') == 'Welcome to Mathesar!' |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Please add
db/
to this, otherwise we're no longer running tests in thedb
module.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.
I've added it. Thanks.