Skip to content

Commit

Permalink
update(ci): ditch peaceiris action for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
luisecm committed Oct 17, 2024
1 parent 37546e8 commit 2b524f2
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 21 deletions.
45 changes: 27 additions & 18 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ jobs:
contents: write
issues: read
steps:
- name: Checkout directory 🔖
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download Merged Report
uses: actions/download-artifact@v4
with:
Expand All @@ -144,16 +149,17 @@ jobs:
# this will store current time with UTC in outputs.timestamp (eg of value: 20231028_233147Z)
run: echo "timestamp=$(date --utc +%Y%m%d_%H%M%SZ)" >> "$GITHUB_OUTPUT"

- name: Deploy Playwright HTML report to Github Pages
if: success()
uses: peaceiris/actions-gh-pages@v4
- name: Deploy Playwright report to Github Pages
if: always()
uses: JamesIves/github-pages-deploy-action@v4
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: Satellite-im/test-reports
keep_files: true
publish_branch: gh-pages
publish_dir: ./playwright-report
destination_dir: ${{ steps.timestampidone.outputs.timestamp }}
folder: playwright-report
branch: gh-pages
commit-message: "Deploying Playwright report to gh-pages"
single-commit: true
token: ${{ secrets.ACTIONS_DEPLOY_KEY }}
repository-name: Satellite-im/test-reports
target-folder: ${{ steps.timestampidone.outputs.timestamp }}

- name: Stop ssh-agent job from first deploy required for deploying a second time
run: killall ssh-agent
Expand Down Expand Up @@ -193,7 +199,7 @@ jobs:
allure_results: allure-results
allure_report: allure-report
allure_history: allure-history
keep_reports: 100
keep_reports: 10
github_repo: Satellite-im/test-reports
github_repo_owner: Satellite-im

Expand All @@ -202,21 +208,24 @@ jobs:
# this will store current time with UTC in outputs.timestamp (eg of value: 20231028_233147Z)
run: echo "timestamp=$(date --utc +%Y%m%d_%H%M%SZ)" >> "$GITHUB_OUTPUT"

- name: Deploy report to Github Pages
if: success()
uses: peaceiris/actions-gh-pages@v4
- name: Deploy Allure report to Github Pages
if: always()
uses: JamesIves/github-pages-deploy-action@v4
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: Satellite-im/test-reports
publish_branch: gh-pages
publish_dir: ./allure-history
folder: allure-history
branch: gh-pages
commit-message: "Deploying Allure report to gh-pages"
single-commit: true
token: ${{ secrets.ACTIONS_DEPLOY_KEY }}
repository-name: Satellite-im/test-reports
target-folder: ${{ steps.timestampidtwo.outputs.timestamp }}

- name: Comment PR with Test Report link
if: always() && github.event_name == 'pull_request'
uses: mshick/add-pr-comment@v2
with:
message: |
Automated tests execution is complete! You can find the Playwright test report [here](https://satellite-im.github.io/test-reports/${{ steps.timestampidone.outputs.timestamp }}/) and the Allure Test Report [here](https://satellite-im.github.io/test-reports/${{ github.run_number }})
Automated tests execution is complete! You can find the Playwright test report [here](https://satellite-im.github.io/test-reports/${{ steps.timestampidone.outputs.timestamp }}/) and the Allure Test Report [here](https://satellite-im.github.io/test-reports/${{ steps.timestampidone.outputs.timestamp }}/)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion playwright.ci.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default defineConfig({
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
forbidOnly: false,
/* Retry on CI only */
retries: process.env.CI ? 2 : 1,
/* Opt out of parallel tests on CI. */
Expand Down
6 changes: 4 additions & 2 deletions playwright/specs/01-pin-input.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { SaveRecoverySeedPage } from "playwright/PageObjects/SaveRecoverySeed";
import { ChatsMainPage } from "playwright/PageObjects/ChatsMain";
import { SettingsProfile } from "playwright/PageObjects/Settings/SettingsProfile";

test.describe("Create Account and Login Tests", () => {
test.describe.only("Create Account and Login Tests", () => {
const username =
faker.person.firstName() + faker.number.int({ min: 100, max: 10000 });
const status = faker.lorem.sentence(3);
Expand Down Expand Up @@ -175,7 +175,9 @@ test.describe("Create Account and Login Tests", () => {
"Scramble keypad?",
);
await expect(loginPinPage.stayUnlockedLabel).toBeVisible();
await expect(loginPinPage.stayUnlockedLabel).toHaveText("Stay unlocked?");
await expect(loginPinPage.stayUnlockedLabel).toHaveText(
"Stay unlocked???????",
);
});

test("A6, A7 - Scramble Keypad will change the order of pin input buttons", async ({
Expand Down

0 comments on commit 2b524f2

Please sign in to comment.