Skip to content

Commit

Permalink
Refactor CI workflow: replace user matrices with environment variable…
Browse files Browse the repository at this point in the history
… setup for macOS and Windows to streamline test user configuration
  • Loading branch information
tsviz committed Dec 1, 2024
1 parent 7044ac8 commit cfb943e
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ jobs:
matrix:
os: [macos-latest, windows-latest]
browser: [chrome, firefox, edge, chromium]
user: [user1, user2, user3, user4, user5, user6, user7, user8]
admin_user: [admin1, admin2, admin3, admin4, admin5, admin6, admin7, admin8]

runs-on: ${{ matrix.os }}

Expand All @@ -106,15 +104,25 @@ jobs:
with:
dotnet-version: '6.0.x'

- name: Set Environment Variables for macOS
if: matrix.os == 'macos-latest'
run: |
echo "TEST_USER=user1" >> $GITHUB_ENV
echo "TEST_ADMIN_USER=admin1" >> $GITHUB_ENV
- name: Set Environment Variables for Windows
if: matrix.os == 'windows-latest'
run: |
echo "TEST_USER=user2" >> $GITHUB_ENV
echo "TEST_ADMIN_USER=admin2" >> $GITHUB_ENV
- name: Run UI Automated Selenium Tests
run: |
dotnet test RazorPagesMovie.UITests/RazorPagesMovie.UITests.csproj --logger "console;verbosity=detailed"
working-directory: tests
env:
BROWSER: ${{ matrix.browser }}
BASE_URL: "https://${{ needs.setup-staging-environment.outputs.CONTAINER_APP_URL }}"
TEST_USER: ${{ matrix.user }}
TEST_ADMIN_USER: ${{ matrix.admin_user }}

create-qa-ticket:
needs: ui-tests
Expand Down

0 comments on commit cfb943e

Please sign in to comment.