name: "Automated tests" on: push: branches: - "develop" - "v2.[5-9].x-release" - "v[3-9].*.x-release" paths-ignore: - "docs/**" - "**/*.md" pull_request: types: [opened, synchronize, reopened] paths-ignore: - "docs/**" - "**/*.md" - "bigbluebutton-html5/public/locales/*.json" permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: build-bbb-apps-akka: uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release with: build-name: bbb-apps-akka cache-files-list: akka-bbb-apps bbb-common-message build-bbb-config: uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release with: build-name: bbb-config cache-files-list: bigbluebutton-config build-bbb-export-annotations: uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release with: build-name: bbb-export-annotations cache-files-list: bbb-export-annotations build-bbb-learning-dashboard: uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release with: build-name: bbb-learning-dashboard cache-files-list: bbb-learning-dashboard build-bbb-playback-record: uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release with: 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-bbb-etherpad: uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release with: build-name: 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 build-bbb-bbb-web: uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release with: build-name: bbb-web cache-files-list: bigbluebutton-web bbb-common-message bbb-common-web build-bbb-fsesl-akka: uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release with: build-name: bbb-fsesl-akka cache-files-list: akka-bbb-fsesl bbb-common-message build-bbb-html5: uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release with: build-name: bbb-html5 build-list: bbb-html5-nodejs bbb-html5 cache-files-list: bigbluebutton-html5 build-bbb-freeswitch: uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release with: build-name: bbb-freeswitch build-list: bbb-freeswitch-core 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 build-bbb-webrtc: uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release with: build-name: bbb-webrtc 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 build-others: uses: bigbluebutton/bigbluebutton/.github/workflows/automated-tests-build-package-job.yml@v2.7.x-release with: build-name: others build-list: bbb-mkclean bbb-pads bbb-libreoffice-docker bbb-transcription-controller bigbluebutton install-and-run-tests: needs: [ build-bbb-apps-akka, build-bbb-config, build-bbb-export-annotations, build-bbb-learning-dashboard, build-bbb-playback-record, build-bbb-etherpad, build-bbb-bbb-web, build-bbb-fsesl-akka, build-bbb-html5, build-bbb-freeswitch, build-bbb-webrtc, build-others, ] 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: - name: Checkout ${{ github.event.pull_request.base.ref || 'master' }} uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.base.ref || '' }} fetch-depth: 0 # Fetch all history - name: Merge pr-${{ github.event.number }} into ${{ github.event.pull_request.base.ref }} if: github.event_name == 'pull_request' run: | git config user.name "BBB Automated Tests" git config user.email "tests@bigbluebutton.org" git config pull.rebase false git pull origin pull/${{ github.event.number }}/head:${{ github.head_ref }} - run: ./build/get_external_dependencies.sh - name: Download artifacts_bbb-apps-akka uses: actions/download-artifact@v3 with: name: artifacts_bbb-apps-akka.tar - run: tar xf artifacts.tar - name: Download artifacts_bbb-config uses: actions/download-artifact@v3 with: name: artifacts_bbb-config.tar - run: tar xf artifacts.tar - name: Download artifacts_bbb-export-annotations uses: actions/download-artifact@v3 with: name: artifacts_bbb-export-annotations.tar - run: tar xf artifacts.tar - name: Download artifacts_bbb-learning-dashboard uses: actions/download-artifact@v3 with: name: artifacts_bbb-learning-dashboard.tar - run: tar xf artifacts.tar - name: Download artifacts_bbb-playback-record uses: actions/download-artifact@v3 with: name: artifacts_bbb-playback-record.tar - run: tar xf artifacts.tar - name: Download artifacts_bbb-etherpad uses: actions/download-artifact@v3 with: name: artifacts_bbb-etherpad.tar - run: tar xf artifacts.tar - name: Download artifacts_bbb-freeswitch uses: actions/download-artifact@v3 with: name: artifacts_bbb-freeswitch.tar - run: tar xf artifacts.tar - name: Download artifacts_bbb-webrtc uses: actions/download-artifact@v3 with: name: artifacts_bbb-webrtc.tar - run: tar xf artifacts.tar - name: Download artifacts_bbb-web uses: actions/download-artifact@v3 with: name: artifacts_bbb-web.tar - run: tar xf artifacts.tar - name: Download artifacts_bbb-fsesl-akka uses: actions/download-artifact@v3 with: name: artifacts_bbb-fsesl-akka.tar - run: tar xf artifacts.tar - name: Download artifacts_bbb-html5 uses: actions/download-artifact@v3 with: name: artifacts_bbb-html5.tar - run: tar xf artifacts.tar - name: Download artifacts uses: actions/download-artifact@v3 with: name: artifacts_others.tar - uses: actions/download-artifact@v3 with: name: pr-comment-data - run: tar xf artifacts.tar - name: Extracting files .tar run: | set -e pwd echo "----ls artifacts/----" ls artifacts/ echo "Done" - name: Generate CA run: | sudo -i < /root/bbb-ci-ssl/bbb-dev-ca.pass ; chmod 600 /root/bbb-ci-ssl/bbb-dev-ca.pass ; openssl genrsa -des3 -out bbb-dev-ca.key -passout file:/root/bbb-ci-ssl/bbb-dev-ca.pass 2048 ; openssl req -x509 -new -nodes -key bbb-dev-ca.key -sha256 -days 1460 -passin file:/root/bbb-ci-ssl/bbb-dev-ca.pass -out bbb-dev-ca.crt -subj "/C=CA/ST=BBB/L=BBB/O=BBB/OU=BBB/CN=BBB-DEV" ; EOF - name: Trust CA run: | sudo -i <> /etc/hosts openssl genrsa -out bbb-ci.test.key 2048 rm -f bbb-ci.test.csr bbb-ci.test.crt bbb-ci.test.key cat > bbb-ci.test.ext << EOF authorityKeyIdentifier=keyid,issuer basicConstraints=CA:FALSE keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment subjectAltName = @alt_names [alt_names] DNS.1 = bbb-ci.test EOF openssl req -nodes -newkey rsa:2048 -keyout bbb-ci.test.key -out bbb-ci.test.csr -subj "/C=CA/ST=BBB/L=BBB/O=BBB/OU=BBB/CN=bbb-ci.test" -addext "subjectAltName = DNS:bbb-ci.test" openssl x509 -req -in bbb-ci.test.csr -CA bbb-dev-ca.crt -CAkey bbb-dev-ca.key -CAcreateserial -out bbb-ci.test.crt -days 825 -sha256 -passin file:/root/bbb-ci-ssl/bbb-dev-ca.pass -extfile bbb-ci.test.ext cd mkdir -p /local/certs/ cp /root/bbb-ci-ssl/bbb-dev-ca.crt /local/certs/ cat /root/bbb-ci-ssl/bbb-ci.test.crt > /local/certs/fullchain.pem cat /root/bbb-ci-ssl/bbb-dev-ca.crt >> /local/certs/fullchain.pem cat /root/bbb-ci-ssl/bbb-ci.test.key > /local/certs/privkey.pem ' - name: Setup local repository shell: bash run: | sudo -i < Packages.gz echo "deb [trusted=yes] file:/artifacts/ ./" >> /etc/apt/sources.list EOF - name: Prepare for install run: | sudo sh -c ' apt --purge -y remove apache2-bin ' - name: Install BBB run: | sudo -i < /etc/apt/sources.list.d/bigbluebutton.list||g" | bash -s -- -v focal-27-dev -s bbb-ci.test -j -d /certs/ bbb-conf --salt bbbci echo "NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/bbb-dev/bbb-dev-ca.crt" >> /usr/share/meteor/bundle/bbb-html5-with-roles.conf sed -i "s/\"minify\": true,/\"minify\": false,/" /usr/share/etherpad-lite/settings.json bbb-conf --restart EOF - name: Install test dependencies working-directory: ./bigbluebutton-tests/playwright run: | sh -c ' npm ci npx playwright install-deps npx playwright install ' - name: Run tests working-directory: ./bigbluebutton-tests/playwright env: NODE_EXTRA_CA_CERTS: /usr/local/share/ca-certificates/bbb-dev/bbb-dev-ca.crt ACTIONS_RUNNER_DEBUG: true BBB_URL: https://bbb-ci.test/bigbluebutton/api BBB_SECRET: bbbci run: npm run test-chromium-ci -- --shard ${{ matrix.shard }} - name: Run Firefox tests working-directory: ./bigbluebutton-tests/playwright if: | contains(github.event.pull_request.labels.*.name, 'test Firefox') || contains(github.event.pull_request.labels.*.name, 'Test Firefox') env: NODE_EXTRA_CA_CERTS: /usr/local/share/ca-certificates/bbb-dev/bbb-dev-ca.crt ACTIONS_RUNNER_DEBUG: true BBB_URL: https://bbb-ci.test/bigbluebutton/api BBB_SECRET: bbbci # patch playwright's firefox so that it uses the system's root certificate authority run: | 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 {} \; npm run test-firefox-ci -- --shard ${{ matrix.shard }} ' - if: always() && github.event_name == 'pull_request' name: Upload blob report to GitHub Actions Artifacts uses: actions/upload-artifact@v3 with: name: all-blob-reports path: bigbluebutton-tests/playwright/blob-report - if: failure() name: Prepare artifacts (configs and logs) run: | sudo -i < ./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