Skip to content

Commit 3ded9da

Browse files
Amend action and created workflow
1 parent 0a2f6d5 commit 3ded9da

File tree

2 files changed

+49
-13
lines changed

2 files changed

+49
-13
lines changed

.github/actions/run-playwright-tests/action.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
1-
name: "Run Util & Example Tests"
1+
name: "Run Playwright Tests"
22
runs-on: ubuntu-latest
3-
timeout-minutes: 3
3+
timeout-minutes: 10
4+
5+
inputs:
6+
bcss_cloud_environment:
7+
description: "The environment to run against in lower case (e.g. bcss-1234)"
8+
required: true
9+
type: string
10+
marker_to_use:
11+
description: "The test marker to use when running tests (e.g. smokescreen)"
12+
required: true
13+
type: string
14+
415
runs:
516
using: "composite"
617
steps:
@@ -16,18 +27,15 @@ runs:
1627
- name: Ensure browsers are installed
1728
shell: bash
1829
run: python -m playwright install --with-deps
19-
- name: Run util tests
30+
- name: Run specified tests
2031
shell: bash
21-
run: pytest -m "utils" --ignore=tests/
22-
- uses: actions/upload-artifact@v4
23-
if: ${{ !cancelled() }}
24-
with:
25-
name: result-output-utils
26-
path: test-results/
27-
retention-days: 3
28-
- name: Run example tests
29-
shell: bash
30-
run: pytest --ignore=tests_utils/
32+
run: pytest -m ${{ inputs.marker_to_use }} --base-url=$URL_TO_USE --ignore=tests_utils/
33+
env:
34+
BCSS_PASS: ${{ secrets.BCSS_PASS }}
35+
ORACLE_DB: ${ ${{ secrets.ORACLE_DB }}/<REPLACE>/${{ inputs.bcss_cloud_environment }} }
36+
ORACLE_USERNAME: ${{ secrets.ORACLE_USERNAME }}
37+
ORACLE_PASS: ${{ secrets.ORACLE_PASS }}
38+
URL_TO_USE: ${ ${{ vars.CLOUD_ENV_URL }}/<REPLACE>/${{ inputs.bcss_cloud_environment }} }
3139
- uses: actions/upload-artifact@v4
3240
if: ${{ !cancelled() }}
3341
with:
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "Test Runner"
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
bcss_cloud_environment:
7+
description: "The environment to run against in lower case (e.g. bcss-1234)"
8+
required: true
9+
type: string
10+
default: "bcss-18680"
11+
marker_to_use:
12+
description: "The test marker to use when running tests (e.g. smokescreen)"
13+
required: true
14+
type: string
15+
16+
jobs:
17+
run-tests:
18+
name: "Run Specified Tests"
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 3
21+
steps:
22+
- name: "Checkout code"
23+
uses: actions/checkout@v4
24+
- name: "Run Util Tests"
25+
uses: ./.github/actions/run-playwright-tests
26+
with:
27+
bcss_cloud_environment: "${{ inputs.bcss_cloud_environment }}"
28+
marker_to_use: "${{ inputs.marker_to_use }}"

0 commit comments

Comments
 (0)