Rebaseline Tests #12
This file contains 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: Rebaseline Tests | |
on: [workflow_dispatch] | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
rebaseline-tests: | |
name: Rebaseline Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- 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 | |
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 | |
echo "EM_CONFIG=$EM_CONFIG" >> $GITHUB_ENV | |
- name: Rebaseline tests | |
run: | | |
git config user.name emscripten-bot | |
git config user.email [email protected] | |
./bootstrap | |
if ./tools/maint/rebaseline_tests.py; then | |
echo "rebaseline_tests returned zero, expectations up-to-date" | |
exit 0 | |
fi | |
code=$? | |
if [[ $code != 2 ]] ; then | |
echo "rebaseline_tests.py failed with unexpected error $code" | |
exit 1 | |
fi | |
- name: Create PR | |
run: | | |
git push origin testing | |
gh pr create --fill --base ${{ github.ref_name }} | |
gh pr merge --squash --auto |