-
Notifications
You must be signed in to change notification settings - Fork 731
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
132 changed files
with
6,310 additions
and
7,841 deletions.
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,155 @@ | ||
name: Playwright Tests | ||
on: | ||
schedule: | ||
- cron: '0 5 * * 1,3,5' | ||
|
||
jobs: | ||
playwright: | ||
name: 'Playwright Tests' | ||
runs-on: ubuntu-latest | ||
env: | ||
TEST_ACCOUNT_12: ${{secrets.AUTOMATION_TEST_ACCOUNT_12}} | ||
TEST_ACCOUNT_13: ${{secrets.AUTOMATION_TEST_ACCOUNT_13}} | ||
TEST_ACCOUNT_MESSAGE_1: ${{secrets.AUTOMATION_TEST_ACCOUNT_MESSAGE_1}} | ||
TEST_ACCOUNT_MESSAGE_2: ${{secrets.AUTOMATION_TEST_ACCOUNT_MESSAGE_2}} | ||
TEST_ACCOUNT_MESSAGE_3: ${{secrets.AUTOMATION_TEST_ACCOUNT_MESSAGE_3}} | ||
TEST_ACCOUNT_MESSAGE_4: ${{secrets.AUTOMATION_TEST_ACCOUNT_MESSAGE_4}} | ||
TEST_ACCOUNT_MESSAGE_5: ${{secrets.AUTOMATION_TEST_ACCOUNT_MESSAGE_5}} | ||
TEST_ACCOUNT_MESSAGE_6: ${{secrets.AUTOMATION_TEST_ACCOUNT_MESSAGE_6}} | ||
TEST_ACCOUNT_SPECIAL_CHARS: ${{secrets.AUTOMATION_TEST_ACCOUNT_SPECIAL_CHARS}} | ||
TEST_ACCOUNTS_PS: ${{secrets.AUTOMATION_ACCOUNTS_PASSWORD}} | ||
TEST_ACCOUNT_MODERATOR: ${{secrets.AUTOMATION_MODERATOR_ACCOUNT}} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
- name: Install dependencies | ||
if: success() || failure() | ||
run: | | ||
sudo apt-get update | ||
pip3 install --user poetry | ||
poetry install | ||
- name: Ensure Playwright browsers are installed | ||
run: | | ||
pip3 install playwright | ||
python -m playwright install | ||
- name: Creating User Sessions | ||
id: create-sessions | ||
working-directory: playwright_tests | ||
run: | | ||
poetry run pytest -m loginSessions --browser firefox --html=reports/creating_user_sessions.html --capture=tee-sys | ||
- name: Run Homepage tests (Firefox) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m homePageTests --numprocesses 2 --browser firefox --html=reports/firefox_homepage_tests_report.html --capture=tee-sys | ||
- name: Run Homepage tests (Chrome) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m homePageTests --numprocesses 2 --browser chrome --html=reports/chrome_homepage_tests_report.html --capture=tee-sys | ||
- name: Run Top-Navbar tests (Firefox) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m topNavbarTests --numprocesses 2 --browser firefox --html=reports/firefox_top_navbar_tests_report.html --capture=tee-sys | ||
- name: Run Top-Navbar tests (Chrome) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m topNavbarTests --numprocesses 2 --browser chrome --html=reports/chrome_top_navbar_tests_report.html --capture=tee-sys | ||
- name: Run Footer tests (Firefox) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m footerSectionTests --numprocesses 2 --browser firefox --html=reports/firefox_footer_tests_report.html --capture=tee-sys | ||
- name: Run Footer tests (Chrome) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m footerSectionTests --numprocesses 2 --browser chrome --html=reports/chrome_footer_tests_report.html --capture=tee-sys | ||
- name: Run Contribute Pages tests (Firefox) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m contributePagesTests --numprocesses 2 --browser firefox --html=reports/firefox_contribute_page_tests_report.html --capture=tee-sys | ||
- name: Run Contribute Page tests (Chrome) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m contributePagesTests --numprocesses 2 --browser chrome --html=reports/chrome_contribute_page_tests_report.html --capture=tee-sys | ||
- name: Run Messaging System Tests (Firefox) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m messagingSystem --numprocesses 2 --browser firefox --html=reports/firefox_messaging_system_tests_report.html --capture=tee-sys | ||
- name: Run Messaging System Tests (Chrome) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m messagingSystem --numprocesses 2 --browser chrome --html=reports/chrome_messaging_system_tests_report.html --capture=tee-sys | ||
- name: Run User Contribution Page Tests (Firefox) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m userContributionTests --numprocesses 2 --browser firefox --html=reports/firefox_user_contribution_tests.html --capture=tee-sys | ||
- name: Run User Contribution Page Tests (Chrome) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m userContributionTests --numprocesses 2 --browser chrome --html=reports/chrome_user_contribution_tests.html --capture=tee-sys | ||
- name: Run User Page Tests (Firefox) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m userProfile --numprocesses 2 --browser firefox --html=reports/firefox_user_page_tests.html --capture=tee-sys | ||
- name: Run User Page Tests (Chrome) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m userProfile --numprocesses 2 --browser chrome --html=reports/chrome_user_page_tests.html --capture=tee-sys | ||
- name: Run User Settings Tests (Firefox) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m userSettings --numprocesses 2 --browser firefox --html=reports/firefox_user_settings_page_tests.html --capture=tee-sys | ||
- name: Run User Settings Tests (Chrome) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m userSettings --numprocesses 2 --browser chrome --html=reports/chrome_user_settings_page_tests.html --capture=tee-sys | ||
- name: Run User Profile Tests (Firefox) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m editUserProfileTests --browser firefox --html=reports/firefox_user_profile_page_tests.html --capture=tee-sys | ||
- name: Run Edit User Profile Tests (Chrome) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m editUserProfileTests --browser chrome --html=reports/chrome_user_profile_page_tests.html --capture=tee-sys | ||
- name: Run User Questions Tests (Firefox) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m userQuestions --numprocesses 2 --browser firefox --html=reports/firefox_user_questions_page_tests.html --capture=tee-sys | ||
- name: Run User Questions Tests (Chrome) | ||
working-directory: playwright_tests | ||
if: success() || failure() && steps.create-sessions.outcome == 'success' | ||
run: | | ||
poetry run pytest -m userQuestions --numprocesses 2 --browser chrome --html=reports/chrome_user_questions_page_tests.html --capture=tee-sys | ||
- name: Combine Reports | ||
working-directory: playwright_tests | ||
if: success() || failure() | ||
run: | | ||
cat reports/*.html > reports/combined_report.html | ||
- name: Upload the combined test report as artifact | ||
if: success() || failure() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Playwright test report | ||
path: | | ||
playwright_tests/reports/ |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.