Skip to content

CI: Check that test expectations are up-to-date #2

CI: Check that test expectations are up-to-date

CI: Check that test expectations are up-to-date #2

name: CI
on:
pull_request:
permissions:
contents: read
jobs:
check-expectations:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Install emsdk
run: |
curl -# -L -o ~/emsdk-main.tar.gz https://github.com/emscripten-core/emsdk/archive/main.tar.gz
tar -C ~ -xf ~/emsdk-main.tar.gz
mv ~/emsdk-main ~/emsdk
cd ~/emsdk
./emsdk install tot
./emsdk activate tot
# Remove the emsdk version of emscripten to save space in the
# persistent workspace and to avoid any confusion with the version
# we are trying to test.
echo "JS_ENGINES = [NODE_JS]" >> .emscripten
echo "final .emscripten:"
cat ~/emsdk/.emscripten
- name: Check test expectaions on main
run: |
git checkout origin/main
if ./tools/maint/rebaseline_tests.py --check; then
echo "Test expectations are out-of-date on the main branch."
echo "You can run `./tools/maint/rebaseline_tests.py --new-branch`"
echo "and use it to create a seperate PR."
exit 1
fi