Bump rollup from 2.79.2 to 2.80.0 in /Development (#127) #305
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'build-test' | |
| on: [pull_request, push] | |
| defaults: | |
| run: | |
| working-directory: Development | |
| env: | |
| SECRET_GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }} | |
| SECRET_RESULTS_SHEET_ID: ${{ secrets.RESULTS_SHEET_ID }} | |
| jobs: | |
| build_and_test: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-node@v4 | |
| - name: set environment variables | |
| shell: bash | |
| run: | | |
| GITHUB_COMMIT=`echo "${{ github.sha }}" | cut -c1-7` | |
| echo "GITHUB_COMMIT=$GITHUB_COMMIT" >> $GITHUB_ENV | |
| - name: install nmos-js | |
| run: | | |
| yarn install | |
| - name: unit test nmos-js | |
| run: | | |
| yarn run lint-check | |
| yarn run build | |
| yarn test --passWithNoTests --coverage --watchAll=false | |
| - name: install python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.8 | |
| - name: install pip | |
| run: | | |
| python -m pip install --upgrade pip | |
| - name: install Chrome | |
| run: | | |
| CHROME_VERSION="141.0.7390.54" | |
| wget -q "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/${CHROME_VERSION}/linux64/chrome-linux64.zip" | |
| unzip -q chrome-linux64.zip | |
| sudo mv chrome-linux64 /opt/ | |
| sudo ln -sf /opt/chrome-linux64/chrome /usr/bin/google-chrome | |
| rm chrome-linux64.zip | |
| - name: install ChromeDriver | |
| run: | | |
| # chromedriver 141.0.7390.54 is recommended for chrome 141.* | |
| CHROMEDRIVER_VERSION="141.0.7390.54" | |
| echo "Installing ChromeDriver version: $CHROMEDRIVER_VERSION" | |
| wget -q "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/$CHROMEDRIVER_VERSION/linux64/chromedriver-linux64.zip" | |
| unzip chromedriver-linux64.zip | |
| chmod +x chromedriver-linux64/chromedriver | |
| sudo mv chromedriver-linux64/chromedriver /usr/local/bin/ | |
| - name: install TestingFacade dependencies | |
| run: | | |
| cd .. | |
| cd TestingFacade | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| cd .. | |
| - name: setup google credentials | |
| if: env.SECRET_GOOGLE_CREDENTIALS | |
| shell: bash | |
| working-directory: ${{ env.GITHUB_WORKSPACE }} | |
| run: | | |
| mkdir -p gdrive | |
| echo "${{ env.SECRET_GOOGLE_CREDENTIALS }}" > secret.b64 | |
| openssl base64 -d -A -in secret.b64 -out gdrive/credentials.json | |
| echo "GDRIVE_CREDENTIALS=`pwd`/gdrive/credentials.json" >> $GITHUB_ENV | |
| - name: controller testing | |
| shell: bash | |
| working-directory: ${{ env.RUNNER_WORKSPACE }} | |
| run: | | |
| set -x | |
| root_dir=`pwd` | |
| chmod +x ${root_dir}/Sandbox/run_controller_tests.sh | |
| # Install AMWA NMOS Testing Tool | |
| git clone https://github.com/AMWA-TV/nmos-testing.git | |
| cd nmos-testing | |
| pip install -r requirements.txt | |
| pip install -r utilities/run-test-suites/gsheetsImport/requirements.txt | |
| mkdir results | |
| mkdir badges | |
| testing_dir=`pwd` | |
| ${root_dir}/Sandbox/run_controller_tests.sh ${root_dir}/Development/ ${root_dir}/TestingFacade/ ${testing_dir} results badges $GITHUB_STEP_SUMMARY "127.0.0.1" "${{ env.GITHUB_COMMIT }}-" | |
| - name: upload to google sheets | |
| if: github.ref == 'refs/heads/master' && github.event_name == 'push' | |
| working-directory: ${{ env.RUNNER_WORKSPACE }} | |
| shell: bash | |
| run: | | |
| export SHEET=https://docs.google.com/spreadsheets/d/${{ env.SECRET_RESULTS_SHEET_ID }} | |
| python nmos-testing/utilities/run-test-suites/gsheetsImport/resultsImporter.py --credentials ${{ env.GDRIVE_CREDENTIALS }} --sheet "$SHEET" --insert --json nmos-testing/results/${{ env.GITHUB_COMMIT }}-*.json || echo "upload failed" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: badges | |
| path: ${{ runner.workspace }}/nmos-js/nmos-testing/badges | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: results | |
| path: ${{ runner.workspace }}/nmos-js/nmos-testing/results | |
| make_badges: | |
| if: github.ref == 'refs/heads/master' && github.event_name == 'push' | |
| needs: [build_and_test] | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: set environment variables | |
| shell: bash | |
| run: | | |
| GITHUB_COMMIT=`echo "${{ github.sha }}" | cut -c1-7` | |
| echo "GITHUB_COMMIT=$GITHUB_COMMIT" >> $GITHUB_ENV | |
| echo "GITHUB_WORKSPACE=${{ github.workspace }}" >> $GITHUB_ENV | |
| echo "RUNNER_WORKSPACE=${{ runner.workspace }}" >> $GITHUB_ENV | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: ${{ runner.workspace }}/artifacts | |
| - name: make badges | |
| run: | | |
| chmod +x ${{ github.workspace }}/Sandbox/make_badges.sh | |
| ${{ github.workspace }}/Sandbox/make_badges.sh ${{ github.workspace }} ${{ runner.workspace }}/artifacts | |
| # force push to github onto an orphan 'badges' branch | |
| cd ${{ github.workspace }} | |
| git checkout --orphan badges-${{ env.GITHUB_COMMIT }} | |
| git rm -rfq --ignore-unmatch . | |
| git add *.svg | |
| git remote set-url --push `git remote` https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
| git config --global user.name 'test-results-uploader' | |
| git config --global user.email '[email protected]' | |
| git commit -qm "Badges for README at ${{ env.GITHUB_COMMIT }}" | |
| git push -f `git remote` badges-${{ env.GITHUB_COMMIT }}:badges |