auto: A19S18 merge master into staging #779
Workflow file for this run
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: CI | |
| on: | |
| [pull_request] | |
| jobs: | |
| build-test: | |
| runs-on: ubuntu-latest | |
| env: | |
| KEYMANHOSTS_TIER: TIER_TEST | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4.1.5 | |
| - name: Build the docker image for keyman.com app | |
| shell: bash | |
| run: | | |
| echo "TIER_TEST" > tier.txt | |
| ./build.sh configure build start --debug | |
| env: | |
| fail-fast: true | |
| # | |
| # Finally, run the tests | |
| # | |
| - name: PHP test | |
| shell: bash | |
| run: | | |
| docker exec keyman-com-app sh -c "vendor/bin/phpunit --testdox" | |
| - name: Lint | |
| shell: bash | |
| run: | | |
| ( set +e; set +o pipefail; find . -name '*.php' | grep -v '/vendor/' | xargs -n 1 -d '\n' php -l | grep -v "No syntax errors detected"; exit ${PIPESTATUS[2]} ) | |
| - name: Check broken links | |
| shell: bash | |
| continue-on-error: false | |
| # Exclude checking locales for each link 'lang=*' | |
| run: | | |
| set +e | |
| set +o pipefail | |
| npx broken-link-checker http://localhost:8053/_test --recursive --ordered ---host-requests 50 -e --filter-level 3 --exclude '*/donate' --exclude '*lang=*' | tee blc.log | |
| echo "BLC_RESULT=${PIPESTATUS[0]}" >> "$GITHUB_ENV" | |
| - name: Report on broken links | |
| run: | | |
| set +e | |
| set +o pipefail | |
| cat blc.log | \ | |
| grep -E "BROKEN|Getting links from" | \ | |
| grep -B 1 "BROKEN"; | |
| exit "${BLC_RESULT}" | |
| - name: Check PHP errors | |
| shell: bash | |
| run: | | |
| CONTAINER=`docker container ls -l -q` | |
| if docker container logs $CONTAINER 2>&1 | grep -q 'php7'; then | |
| echo 'PHP reported errors or warnings:' | |
| docker container logs $CONTAINER 2>&1 | grep 'php7' | |
| exit 1 | |
| else | |
| echo 'No PHP errors found' | |
| exit 0 | |
| fi |