chore: Update CI workflow job and step names for clarity and consistency (#4847)

Update CI workflow job and step names for clarity and consistency
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-11-27 12:33:07 -03:00 • committed by GitHub
commit ad43340a9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -54,6 +54,7 @@ env:
jobs: jobs:
determine-test-suite: determine-test-suite:
name: Determine Test Suites and Shard Distribution
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
matrix: ${{ steps.setup-matrix.outputs.matrix }} matrix: ${{ steps.setup-matrix.outputs.matrix }}
@ -71,7 +72,7 @@ jobs:
with: with:
filters: .github/changes-filter.yaml filters: .github/changes-filter.yaml
- name: Set Matrix and Test Grep - name: Determine Test Suites from Changes
id: set-matrix id: set-matrix
run: | run: |
# Start with input suites if provided, otherwise empty array # Start with input suites if provided, otherwise empty array
@ -171,11 +172,11 @@ jobs:
cache: "npm" cache: "npm"
cache-dependency-path: ./src/frontend/package-lock.json cache-dependency-path: ./src/frontend/package-lock.json
- name: Install Node.js dependencies - name: Install Frontend Dependencies
run: npm ci run: npm ci
working-directory: ./src/frontend working-directory: ./src/frontend
- name: Setup Matrix Combinations - name: Calculate Test Shards Distribution
id: setup-matrix id: setup-matrix
run: | run: |
cd src/frontend cd src/frontend
@ -209,7 +210,7 @@ jobs:
echo "matrix={\"include\":[$MATRIX_COMBINATIONS]}" >> "$GITHUB_OUTPUT" echo "matrix={\"include\":[$MATRIX_COMBINATIONS]}" >> "$GITHUB_OUTPUT"
setup-and-test: setup-and-test:
name: Playwright Tests - Group ${{ matrix.shardIndex }}/${{ matrix.shardTotal }} name: Playwright Tests - Shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ needs.determine-test-suite.outputs.test_grep != '' }} if: ${{ needs.determine-test-suite.outputs.test_grep != '' }}
needs: determine-test-suite needs: determine-test-suite
@ -226,14 +227,12 @@ jobs:
outputs: outputs:
failed: ${{ steps.check-failure.outputs.failed }} failed: ${{ steps.check-failure.outputs.failed }}
steps: steps:
- name: Checkout code - name: Checkout Repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
# If ref is passed as input, checkout that ref
# else checkout the default ref
ref: ${{ inputs.ref || github.ref }} ref: ${{ inputs.ref || github.ref }}
- name: Setup Node ${{ env.NODE_VERSION }} - name: Setup Node.js Environment
uses: actions/setup-node@v4 uses: actions/setup-node@v4
id: setup-node id: setup-node
with: with:
@ -241,28 +240,29 @@ jobs:
cache: "npm" cache: "npm"
cache-dependency-path: ./src/frontend/package-lock.json cache-dependency-path: ./src/frontend/package-lock.json
- name: Install Node.js dependencies - name: Install Frontend Dependencies
run: npm ci run: npm ci
working-directory: ./src/frontend working-directory: ./src/frontend
- name: Install Playwright - name: Install Playwright Browser Dependencies
id: install-playwright id: install-playwright
uses: ./.github/actions/install-playwright uses: ./.github/actions/install-playwright
with: with:
working-directory: ./src/frontend working-directory: ./src/frontend
browsers: chromium browsers: chromium
- name: "Setup Environment" - name: Setup Python Environment with UV
uses: ./.github/actions/setup-uv uses: ./.github/actions/setup-uv
- name: Install the project
- name: Install Python Dependencies
run: uv sync --dev run: uv sync --dev
- name: create .env - name: Configure Environment Variables
run: | run: |
touch .env touch .env
echo "${{ secrets.ENV_VARS }}" > .env echo "${{ secrets.ENV_VARS }}" > .env
- name: Run Playwright Tests - name: Execute Playwright Tests
uses: nick-fields/retry@v3 uses: nick-fields/retry@v3
with: with:
timeout_minutes: 12 timeout_minutes: 12
@ -276,7 +276,7 @@ jobs:
npx playwright test ${{ inputs.tests_folder }} ${{ needs.determine-test-suite.outputs.test_grep }} --trace on --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --workers 2 npx playwright test ${{ inputs.tests_folder }} ${{ needs.determine-test-suite.outputs.test_grep }} --trace on --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --workers 2
- name: Upload blob report to GitHub Actions Artifacts - name: Upload Test Results
if: always() if: always()
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
@ -284,7 +284,7 @@ jobs:
path: src/frontend/blob-report path: src/frontend/blob-report
retention-days: 1 retention-days: 1
- name: Minimize uv cache - name: Cleanup UV Cache
run: uv cache prune --ci run: uv cache prune --ci
merge-reports: merge-reports: