ci(tests): use sharding on CI test execution
This commit is contained in:
parent
133da09996
commit
62a9a776c8
87
.github/workflows/automated-tests.yml
vendored
87
.github/workflows/automated-tests.yml
vendored
@ -20,79 +20,54 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
jobs:
|
jobs:
|
||||||
save-pr-number:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Save data to comment workflow
|
|
||||||
env:
|
|
||||||
PR_NUMBER: ${{ github.event.number }}
|
|
||||||
WORKFLOW_ID: ${{ github.run_id }}
|
|
||||||
run: |
|
|
||||||
mkdir -p ./pr-comment-data
|
|
||||||
echo $PR_NUMBER > ./pr-comment-data/pr_number
|
|
||||||
echo $WORKFLOW_ID > ./pr-comment-data/workflow_id
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: pr-comment-data
|
|
||||||
path: pr-comment-data
|
|
||||||
build-bbb-apps-akka:
|
build-bbb-apps-akka:
|
||||||
needs: save-pr-number
|
|
||||||
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
||||||
with:
|
with:
|
||||||
build-name: bbb-apps-akka
|
build-name: bbb-apps-akka
|
||||||
cache-files-list: akka-bbb-apps bbb-common-message
|
cache-files-list: akka-bbb-apps bbb-common-message
|
||||||
build-bbb-config:
|
build-bbb-config:
|
||||||
needs: save-pr-number
|
|
||||||
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
||||||
with:
|
with:
|
||||||
build-name: bbb-config
|
build-name: bbb-config
|
||||||
cache-files-list: bigbluebutton-config
|
cache-files-list: bigbluebutton-config
|
||||||
build-bbb-export-annotations:
|
build-bbb-export-annotations:
|
||||||
needs: save-pr-number
|
|
||||||
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
||||||
with:
|
with:
|
||||||
build-name: bbb-export-annotations
|
build-name: bbb-export-annotations
|
||||||
cache-files-list: bbb-export-annotations
|
cache-files-list: bbb-export-annotations
|
||||||
build-bbb-learning-dashboard:
|
build-bbb-learning-dashboard:
|
||||||
needs: save-pr-number
|
|
||||||
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
||||||
with:
|
with:
|
||||||
build-name: bbb-learning-dashboard
|
build-name: bbb-learning-dashboard
|
||||||
cache-files-list: bbb-learning-dashboard
|
cache-files-list: bbb-learning-dashboard
|
||||||
build-bbb-playback-record:
|
build-bbb-playback-record:
|
||||||
needs: save-pr-number
|
|
||||||
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
||||||
with:
|
with:
|
||||||
build-name: bbb-playback-record
|
build-name: bbb-playback-record
|
||||||
build-list: bbb-playback bbb-playback-notes bbb-playback-podcast bbb-playback-presentation bbb-playback-screenshare bbb-playback-video bbb-record-core
|
build-list: bbb-playback bbb-playback-notes bbb-playback-podcast bbb-playback-presentation bbb-playback-screenshare bbb-playback-video bbb-record-core
|
||||||
build-bbb-etherpad:
|
build-bbb-etherpad:
|
||||||
needs: save-pr-number
|
|
||||||
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
||||||
with:
|
with:
|
||||||
build-name: bbb-etherpad
|
build-name: bbb-etherpad
|
||||||
cache-files-list: bbb-etherpad.placeholder.sh build/packages-template/bbb-etherpad
|
cache-files-list: bbb-etherpad.placeholder.sh build/packages-template/bbb-etherpad
|
||||||
cache-urls-list: https://api.github.com/repos/mconf/ep_pad_ttl/commits https://api.github.com/repos/alangecker/bbb-etherpad-plugin/commits https://api.github.com/repos/mconf/ep_redis_publisher/commits https://api.github.com/repos/alangecker/bbb-etherpad-skin/commits
|
cache-urls-list: https://api.github.com/repos/mconf/ep_pad_ttl/commits https://api.github.com/repos/alangecker/bbb-etherpad-plugin/commits https://api.github.com/repos/mconf/ep_redis_publisher/commits https://api.github.com/repos/alangecker/bbb-etherpad-skin/commits
|
||||||
build-bbb-bbb-web:
|
build-bbb-bbb-web:
|
||||||
needs: save-pr-number
|
|
||||||
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
||||||
with:
|
with:
|
||||||
build-name: bbb-web
|
build-name: bbb-web
|
||||||
cache-files-list: bigbluebutton-web bbb-common-message bbb-common-web
|
cache-files-list: bigbluebutton-web bbb-common-message bbb-common-web
|
||||||
build-bbb-fsesl-akka:
|
build-bbb-fsesl-akka:
|
||||||
needs: save-pr-number
|
|
||||||
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
||||||
with:
|
with:
|
||||||
build-name: bbb-fsesl-akka
|
build-name: bbb-fsesl-akka
|
||||||
cache-files-list: akka-bbb-fsesl bbb-common-message
|
cache-files-list: akka-bbb-fsesl bbb-common-message
|
||||||
build-bbb-html5:
|
build-bbb-html5:
|
||||||
needs: save-pr-number
|
|
||||||
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
||||||
with:
|
with:
|
||||||
build-name: bbb-html5
|
build-name: bbb-html5
|
||||||
build-list: bbb-html5-nodejs bbb-html5
|
build-list: bbb-html5-nodejs bbb-html5
|
||||||
cache-files-list: bigbluebutton-html5
|
cache-files-list: bigbluebutton-html5
|
||||||
build-bbb-freeswitch:
|
build-bbb-freeswitch:
|
||||||
needs: save-pr-number
|
|
||||||
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
||||||
with:
|
with:
|
||||||
build-name: bbb-freeswitch
|
build-name: bbb-freeswitch
|
||||||
@ -100,14 +75,12 @@ jobs:
|
|||||||
cache-files-list: freeswitch.placeholder.sh build/packages-template/bbb-freeswitch-core build/packages-template/bbb-freeswitch-sounds
|
cache-files-list: freeswitch.placeholder.sh build/packages-template/bbb-freeswitch-core build/packages-template/bbb-freeswitch-sounds
|
||||||
cache-urls-list: http://bigbluebutton.org/downloads/sounds.tar.gz
|
cache-urls-list: http://bigbluebutton.org/downloads/sounds.tar.gz
|
||||||
build-bbb-webrtc:
|
build-bbb-webrtc:
|
||||||
needs: save-pr-number
|
|
||||||
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
||||||
with:
|
with:
|
||||||
build-name: bbb-webrtc
|
build-name: bbb-webrtc
|
||||||
build-list: bbb-webrtc-sfu bbb-webrtc-recorder
|
build-list: bbb-webrtc-sfu bbb-webrtc-recorder
|
||||||
cache-files-list: bbb-webrtc-sfu.placeholder.sh bbb-webrtc-recorder.placeholder.sh build/packages-template/bbb-webrtc-sfu build/packages-template/bbb-webrtc-recorder
|
cache-files-list: bbb-webrtc-sfu.placeholder.sh bbb-webrtc-recorder.placeholder.sh build/packages-template/bbb-webrtc-sfu build/packages-template/bbb-webrtc-recorder
|
||||||
build-others:
|
build-others:
|
||||||
needs: save-pr-number
|
|
||||||
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release
|
||||||
with:
|
with:
|
||||||
build-name: others
|
build-name: others
|
||||||
@ -129,6 +102,10 @@ jobs:
|
|||||||
build-others,
|
build-others,
|
||||||
]
|
]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
shard: [1/10, 2/10, 3/10, 4/10, 5/10, 6/10, 7/10, 8/10, 9/10, 10/10]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout ${{ github.event.pull_request.base.ref || 'master' }}
|
- name: Checkout ${{ github.event.pull_request.base.ref || 'master' }}
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -301,7 +278,7 @@ jobs:
|
|||||||
ACTIONS_RUNNER_DEBUG: true
|
ACTIONS_RUNNER_DEBUG: true
|
||||||
BBB_URL: https://bbb-ci.test/bigbluebutton/api
|
BBB_URL: https://bbb-ci.test/bigbluebutton/api
|
||||||
BBB_SECRET: bbbci
|
BBB_SECRET: bbbci
|
||||||
run: npm run test-chromium-ci
|
run: npm run test-chromium-ci -- --shard ${{ matrix.shard }}
|
||||||
- name: Run Firefox tests
|
- name: Run Firefox tests
|
||||||
working-directory: ./bigbluebutton-tests/playwright
|
working-directory: ./bigbluebutton-tests/playwright
|
||||||
if: |
|
if: |
|
||||||
@ -316,20 +293,14 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sh -c '
|
sh -c '
|
||||||
find $HOME/.cache/ms-playwright -name libnssckbi.so -exec rm {} \; -exec ln -s /usr/lib/x86_64-linux-gnu/pkcs11/p11-kit-trust.so {} \;
|
find $HOME/.cache/ms-playwright -name libnssckbi.so -exec rm {} \; -exec ln -s /usr/lib/x86_64-linux-gnu/pkcs11/p11-kit-trust.so {} \;
|
||||||
npm run test-firefox-ci
|
npm run test-firefox-ci -- --shard ${{ matrix.shard }}
|
||||||
'
|
'
|
||||||
- if: always()
|
- if: always() && github.event_name == 'pull_request'
|
||||||
|
name: Upload blob report to GitHub Actions Artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: tests-report
|
name: all-blob-reports
|
||||||
path: |
|
path: bigbluebutton-tests/playwright/blob-report
|
||||||
bigbluebutton-tests/playwright/playwright-report
|
|
||||||
bigbluebutton-tests/playwright/test-results
|
|
||||||
- if: always()
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: pr-comment-data
|
|
||||||
path: ~/pr-comment-data
|
|
||||||
- if: failure()
|
- if: failure()
|
||||||
name: Prepare artifacts (configs and logs)
|
name: Prepare artifacts (configs and logs)
|
||||||
run: |
|
run: |
|
||||||
@ -365,3 +336,41 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: bbb-logs
|
name: bbb-logs
|
||||||
path: ./bbb-logs.tar.gz
|
path: ./bbb-logs.tar.gz
|
||||||
|
upload-report:
|
||||||
|
if: always()
|
||||||
|
needs: install-and-run-tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
- name: Install dependencies
|
||||||
|
working-directory: ./bigbluebutton-tests/playwright
|
||||||
|
run: npm ci
|
||||||
|
- name: Download all blob reports from GitHub Actions Artifacts
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: all-blob-reports
|
||||||
|
path: bigbluebutton-tests/playwright
|
||||||
|
- name: Merge into HTML Report
|
||||||
|
working-directory: ./bigbluebutton-tests/playwright
|
||||||
|
run: npx playwright merge-reports --reporter html ./all-blob-reports
|
||||||
|
- name: Upload HTML tests report
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: tests-report
|
||||||
|
path: |
|
||||||
|
bigbluebutton-tests/playwright/playwright-report
|
||||||
|
bigbluebutton-tests/playwright/test-results
|
||||||
|
- name: Write PR data for auto-comment
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
run: |
|
||||||
|
echo '${{ github.event.number }} > ./pr-comment-data/pr_number'
|
||||||
|
echo '${{ github.run_id }} > ./pr-comment-data/workflow_id'
|
||||||
|
- name: Upload PR data for auto-comment
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: pr-comment-data
|
||||||
|
path: pr-comment-data
|
||||||
|
@ -9,7 +9,7 @@ const config = {
|
|||||||
workers: CI ? 1 : 2,
|
workers: CI ? 1 : 2,
|
||||||
timeout: 3 * 60 * 1000,
|
timeout: 3 * 60 * 1000,
|
||||||
reporter: [
|
reporter: [
|
||||||
[CI ? 'github' : 'list'],
|
CI ? ['blob', 'github'] : ['list'],
|
||||||
['html', { open: 'never' }],
|
['html', { open: 'never' }],
|
||||||
],
|
],
|
||||||
forbidOnly: CI,
|
forbidOnly: CI,
|
||||||
|
Loading…
Reference in New Issue
Block a user