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' permissions: contents: read jobs: build-bbb-apps-akka: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 with: fetch-depth: 0 # Fetch all history - run: echo "CACHE_AKKA_APPS_KEY=$(git log -1 --format=%H -- akka-bbb-apps)" >> $GITHUB_ENV - run: echo "CACHE_COMMON_MSG_KEY=$(git log -1 --format=%H -- bbb-common-message)" >> $GITHUB_ENV - run: echo "CACHE_BBB_RELEASE_KEY=$(git log -1 --format=%H -- bigbluebutton-config/bigbluebutton-release)" >> $GITHUB_ENV - name: Handle cache id: cache-action uses: actions/cache@v3 with: path: artifacts.tar key: ${{ runner.os }}-bbb-apps-akka-${{ env.CACHE_AKKA_APPS_KEY }}-${{ env.CACHE_COMMON_MSG_KEY }}-${{ env.CACHE_BBB_RELEASE_KEY }} - if: ${{ steps.cache-action.outputs.cache-hit != 'true' }} name: Generate artifacts run: | ./build/get_external_dependencies.sh echo "FORCE_GIT_REV=0" >> $GITHUB_ENV echo "FORCE_COMMIT_DATE=0" >> $GITHUB_ENV ./build/setup.sh bbb-apps-akka tar cvf artifacts.tar artifacts/ - name: Archive packages uses: actions/upload-artifact@v3 with: name: artifacts_bbb-apps-akka.tar path: | artifacts.tar build-bbb-config: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - run: | ./build/get_external_dependencies.sh echo "FORCE_GIT_REV=0" >> $GITHUB_ENV echo "FORCE_COMMIT_DATE=0" >> $GITHUB_ENV ./build/setup.sh bbb-config tar cvf artifacts.tar artifacts/ - name: Archive packages uses: actions/upload-artifact@v3 with: name: artifacts_bbb-config.tar path: artifacts.tar build-bbb-export-annotations: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - run: | ./build/get_external_dependencies.sh echo "FORCE_GIT_REV=0" >> $GITHUB_ENV echo "FORCE_COMMIT_DATE=0" >> $GITHUB_ENV ./build/setup.sh bbb-export-annotations tar cvf artifacts.tar artifacts/ - name: Archive packages uses: actions/upload-artifact@v3 with: name: artifacts_bbb-export-annotations.tar path: artifacts.tar build-bbb-learning-dashboard: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 with: fetch-depth: 0 # Fetch all history - run: echo "CACHE_LEARNING_DASHBOARD_KEY=$(git log -1 --format=%H -- bbb-learning-dashboard)" >> $GITHUB_ENV - run: echo "CACHE_BBB_RELEASE_KEY=$(git log -1 --format=%H -- bigbluebutton-config/bigbluebutton-release)" >> $GITHUB_ENV - name: Handle cache id: cache-action uses: actions/cache@v3 with: path: artifacts.tar key: ${{ runner.os }}-bbb-learning-dashboard-${{ env.CACHE_LEARNING_DASHBOARD_KEY }}-${{ env.CACHE_BBB_RELEASE_KEY }} - if: ${{ steps.cache-action.outputs.cache-hit != 'true' }} name: Generate artifacts run: | ./build/get_external_dependencies.sh echo "FORCE_GIT_REV=0" >> $GITHUB_ENV echo "FORCE_COMMIT_DATE=0" >> $GITHUB_ENV ./build/setup.sh bbb-learning-dashboard tar cvf artifacts.tar artifacts/ - name: Archive packages uses: actions/upload-artifact@v3 with: name: artifacts_bbb-learning-dashboard.tar path: artifacts.tar build-bbb-playback-record: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - run: ./build/get_external_dependencies.sh - run: echo "FORCE_GIT_REV=0" >> $GITHUB_ENV - run: echo "FORCE_COMMIT_DATE=0" >> $GITHUB_ENV - run: ./build/setup.sh bbb-playback - run: ./build/setup.sh bbb-playback-notes - run: ./build/setup.sh bbb-playback-podcast - run: ./build/setup.sh bbb-playback-presentation - run: ./build/setup.sh bbb-playback-screenshare - run: ./build/setup.sh bbb-playback-video - run: ./build/setup.sh bbb-record-core - run: tar cvf artifacts.tar artifacts/ - name: Archive packages uses: actions/upload-artifact@v3 with: name: artifacts_bbb-playback-record.tar path: | artifacts.tar build-bbb-etherpad: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 with: fetch-depth: 0 # Fetch all history - run: echo "CACHE_ETHERPAD_VERSION_KEY=$(git log -1 --format=%H -- bbb-etherpad.placeholder.sh)" >> $GITHUB_ENV - run: echo "CACHE_ETHERPAD_BUILD_KEY=$(git log -1 --format=%H -- build/packages-template/bbb-etherpad)" >> $GITHUB_ENV - run: echo "CACHE_URL1_KEY=$(curl -s https://api.github.com/repos/mconf/ep_pad_ttl/commits | md5sum | awk '{ print $1 }')" >> $GITHUB_ENV - run: echo "CACHE_URL2_KEY=$(curl -s https://api.github.com/repos/alangecker/bbb-etherpad-plugin/commits | md5sum | awk '{ print $1 }')" >> $GITHUB_ENV - run: echo "CACHE_URL3_KEY=$(curl -s https://api.github.com/repos/mconf/ep_redis_publisher/commits | md5sum | awk '{ print $1 }')" >> $GITHUB_ENV - run: echo "CACHE_URL4_KEY=$(curl -s https://api.github.com/repos/alangecker/bbb-etherpad-skin/commits | md5sum | awk '{ print $1 }')" >> $GITHUB_ENV - run: echo "CACHE_BBB_RELEASE_KEY=$(git log -1 --format=%H -- bigbluebutton-config/bigbluebutton-release)" >> $GITHUB_ENV - name: Handle cache id: cache-action uses: actions/cache@v3 with: path: artifacts.tar key: ${{ runner.os }}-bbb-etherpad-${{ env.CACHE_ETHERPAD_VERSION_KEY }}-${{ env.CACHE_ETHERPAD_BUILD_KEY }}-${{ env.CACHE_URL1_KEY }}-${{ env.CACHE_URL2_KEY }}-${{ env.CACHE_URL3_KEY }}-${{ env.CACHE_URL4_KEY }}-${{ env.CACHE_BBB_RELEASE_KEY }} - if: ${{ steps.cache-action.outputs.cache-hit != 'true' }} name: Generate artifacts run: | ./build/get_external_dependencies.sh echo "FORCE_GIT_REV=0" >> $GITHUB_ENV echo "FORCE_COMMIT_DATE=0" >> $GITHUB_ENV ./build/setup.sh bbb-etherpad tar cvf artifacts.tar artifacts/ - name: Archive packages uses: actions/upload-artifact@v3 with: name: artifacts_bbb-etherpad.tar path: | artifacts.tar build-bbb-bbb-web: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 with: fetch-depth: 0 # Fetch all history - run: echo "CACHE_BBB_WEB_KEY=$(git log -1 --format=%H -- bigbluebutton-web)" >> $GITHUB_ENV - run: echo "CACHE_COMMON_MSG_KEY=$(git log -1 --format=%H -- bbb-common-message)" >> $GITHUB_ENV - run: echo "CACHE_COMMON_WEB_KEY=$(git log -1 --format=%H -- bbb-common-web)" >> $GITHUB_ENV - run: echo "CACHE_BBB_RELEASE_KEY=$(git log -1 --format=%H -- bigbluebutton-config/bigbluebutton-release)" >> $GITHUB_ENV - name: Handle cache id: cache-action uses: actions/cache@v3 with: path: artifacts.tar key: ${{ runner.os }}-bbb-web-${{ env.CACHE_BBB_WEB_KEY }}-${{ env.CACHE_COMMON_MSG_KEY }}-${{ env.CACHE_COMMON_WEB_KEY }}-${{ env.CACHE_BBB_RELEASE_KEY }} - if: ${{ steps.cache-action.outputs.cache-hit != 'true' }} name: Generate artifacts run: | ./build/get_external_dependencies.sh echo "FORCE_GIT_REV=0" >> $GITHUB_ENV echo "FORCE_COMMIT_DATE=0" >> $GITHUB_ENV ./build/setup.sh bbb-web tar cvf artifacts.tar artifacts/ - name: Archive packages uses: actions/upload-artifact@v3 with: name: artifacts_bbb-web.tar path: | artifacts.tar build-bbb-fsesl-akka: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 with: fetch-depth: 0 # Fetch all history - run: echo "CACHE_AKKA_FSESL_KEY=$(git log -1 --format=%H -- akka-bbb-fsesl)" >> $GITHUB_ENV - run: echo "CACHE_COMMON_MSG_KEY=$(git log -1 --format=%H -- bbb-common-message)" >> $GITHUB_ENV - run: echo "CACHE_BBB_RELEASE_KEY=$(git log -1 --format=%H -- bigbluebutton-config/bigbluebutton-release)" >> $GITHUB_ENV - name: Handle cache id: cache-action uses: actions/cache@v3 with: path: artifacts.tar key: ${{ runner.os }}-bbb-fsesl-akka-${{ env.CACHE_AKKA_FSESL_KEY }}-${{ env.CACHE_COMMON_MSG_KEY }}-${{ env.CACHE_BBB_RELEASE_KEY }} - if: ${{ steps.cache-action.outputs.cache-hit != 'true' }} name: Generate artifacts run: | ./build/get_external_dependencies.sh echo "FORCE_GIT_REV=0" >> $GITHUB_ENV echo "FORCE_COMMIT_DATE=0" >> $GITHUB_ENV ./build/setup.sh bbb-fsesl-akka tar cvf artifacts.tar artifacts/ - name: Archive packages uses: actions/upload-artifact@v3 with: name: artifacts_bbb-fsesl-akka.tar path: | artifacts.tar build-bbb-html5: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 with: fetch-depth: 0 # Fetch all history - run: echo "CACHE_KEY=$(git log -1 --format=%H -- bigbluebutton-html5)" >> $GITHUB_ENV - run: echo "CACHE_BBB_RELEASE_KEY=$(git log -1 --format=%H -- bigbluebutton-config/bigbluebutton-release)" >> $GITHUB_ENV - name: Handle cache id: cache-action uses: actions/cache@v3 with: path: artifacts.tar key: ${{ runner.os }}-bbb-html5-${{ env.CACHE_KEY }}-${{ env.CACHE_BBB_RELEASE_KEY }} - if: ${{ steps.cache-action.outputs.cache-hit != 'true' }} name: Generate artifacts run: | ./build/get_external_dependencies.sh echo "FORCE_GIT_REV=0" >> $GITHUB_ENV echo "FORCE_COMMIT_DATE=0" >> $GITHUB_ENV ./build/setup.sh bbb-html5-nodejs ./build/setup.sh bbb-html5 tar cvf artifacts.tar artifacts/ - name: Archive packages uses: actions/upload-artifact@v3 with: name: artifacts_bbb-html5.tar path: | artifacts.tar build-bbb-freeswitch: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 with: fetch-depth: 0 # Fetch all history - run: echo "CACHE_FREESWITCH_KEY=$(git log -1 --format=%H -- build/packages-template/bbb-freeswitch-core)" >> $GITHUB_ENV - run: echo "CACHE_FREESWITCH_SOUNDS_KEY=$(git log -1 --format=%H -- build/packages-template/bbb-freeswitch-sounds)" >> $GITHUB_ENV - run: echo "CACHE_SOUNDS_KEY=$(curl -Is http://bigbluebutton.org/downloads/sounds.tar.gz | grep "Last-Modified" | md5sum | awk '{ print $1 }')" >> $GITHUB_ENV - run: echo "CACHE_BBB_RELEASE_KEY=$(git log -1 --format=%H -- bigbluebutton-config/bigbluebutton-release)" >> $GITHUB_ENV - name: Handle cache id: cache-action uses: actions/cache@v3 with: path: artifacts.tar key: ${{ runner.os }}-bbb-freeswitch-${{ env.CACHE_FREESWITCH_KEY }}-${{ env.CACHE_FREESWITCH_SOUNDS_KEY }}-${{ env.CACHE_SOUNDS_KEY }}-${{ env.CACHE_BBB_RELEASE_KEY }} - if: ${{ steps.cache-action.outputs.cache-hit != 'true' }} name: Generate artifacts run: | ./build/get_external_dependencies.sh echo "FORCE_GIT_REV=0" >> $GITHUB_ENV echo "FORCE_COMMIT_DATE=0" >> $GITHUB_ENV ./build/setup.sh bbb-freeswitch-core ./build/setup.sh bbb-freeswitch-sounds tar cvf artifacts.tar artifacts/ - name: Archive packages uses: actions/upload-artifact@v3 with: name: artifacts_bbb-freeswitch.tar path: | artifacts.tar build-others: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - run: ./build/get_external_dependencies.sh - run: echo "FORCE_GIT_REV=0" >> $GITHUB_ENV - run: echo "FORCE_COMMIT_DATE=0" >> $GITHUB_ENV - run: ./build/setup.sh bbb-mkclean - run: ./build/setup.sh bbb-pads - run: ./build/setup.sh bbb-libreoffice-docker - run: ./build/setup.sh bbb-webrtc-sfu - run: ./build/setup.sh bbb-webrtc-recorder - run: ./build/setup.sh bbb-transcription-controller - run: ./build/setup.sh bigbluebutton - run: tar cvf artifacts.tar artifacts/ - name: Archive packages uses: actions/upload-artifact@v3 with: name: artifacts.tar path: | artifacts.tar # - name: Fake package build # run: | # sudo -i </dev/null || true # mv artifacts/bbb-fsesl-akka_2* artifacts/bbb-fsesl-akka_2:${VERSION}_all.deb 2>/dev/null || true # mv artifacts/bbb-etherpad* artifacts/bbb-etherpad_${VERSION}_amd64.deb 2>/dev/null || true # mv artifacts/bbb-freeswitch-core* artifacts/bbb-freeswitch-core_${VERSION}_amd64.deb 2>/dev/null || true # mv artifacts/bbb-freeswitch-sounds* artifacts/bbb-freeswitch-sounds_${VERSION}_amd64.deb 2>/dev/null || true # mv artifacts/bbb-html5-nodejs* artifacts/bbb-html5-nodejs_${VERSION}_amd64.deb 2>/dev/null || true # mv artifacts/bbb-html5_* artifacts/bbb-html5_${VERSION}_amd64.deb 2>/dev/null || true # mv artifacts/bbb-web_* artifacts/bbb-web_${VERSION}_amd64.deb 2>/dev/null || true # mv artifacts/bbb-learning-dashboard_* artifacts/bbb-learning-dashboard_${VERSION}_amd64.deb 2>/dev/null || true # mv artifacts/bbb-config_* artifacts/bbb-config_${VERSION}_amd64.deb 2>/dev/null || true # echo "----Renamed----" # ls artifacts/ - 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 install 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 - 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 ' - if: always() uses: actions/upload-artifact@v3 with: name: tests-report path: | bigbluebutton-tests/playwright/playwright-report bigbluebutton-tests/playwright/test-results - if: failure() name: Prepare artifacts (configs and logs) run: | sudo -i <