Skip to content

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

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

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

name: CI
on:
pull_request:
permissions:
contents: read
jobs:
check-expectations:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # We want access to other branches, specifically `main`
- name: pip install
run: |
which python3
python3 --version
python3 -m pip install -r requirements-dev.txt
- name: Install emsdk
run: |
EM_CONFIG=$HOME/emsdk/.emscripten
echo $EM_CONFIG
echo "EM_CONFIG=$EM_CONFIG" >> $GITHUB_ENV
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
echo "JS_ENGINES = [NODE_JS]" >> $EM_CONFIG
echo "final config:"
cat $EM_CONFIG
- name: Check test expectaions on main
run: |
git checkout origin/main
git checkout - ./tools/maint/rebaseline_tests.py
./bootstrap
if ! ./tools/maint/rebaseline_tests.py --check-only; 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