diff --git a/.circleci/config.yml b/.circleci/config.yml index 40a4c5ce56..0ed88dd150 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,24 +37,6 @@ execution_steps: &execution_steps - run: hostPath=$HOME/.esvu/bin/$hostPath npm run ci jobs: - "Test262: verify tools; build tests": - docker: - - image: cimg/python:3.7.4 - working_directory: ~/test262 - steps: - - checkout - - run: - name: "Install requirements for generation tool" - command: python -m pip install --user --requirement tools/generation/requirements.txt - - run: - name: "Test the generation tool" - command: ./tools/generation/test/run.py - - run: - name: "Build tests; check for new changes" - command: ./tools/scripts/ci_build.sh - # - run: - # name: "Run deploy" - # command: ./tools/scripts/deploy.sh "V8: New or modified tests execution": docker: - image: *node_image @@ -126,9 +108,6 @@ jobs: <<: [*execution_steps] workflows: version: 2 - Tools: - jobs: - - "Test262: verify tools; build tests" Tests execution: jobs: # - "ChakraCore: New or modified tests execution" diff --git a/.github/workflows/tools-pr.yml b/.github/workflows/tools-pr.yml index e8490986cd..db8e28eb06 100644 --- a/.github/workflows/tools-pr.yml +++ b/.github/workflows/tools-pr.yml @@ -35,3 +35,37 @@ jobs: echo $file done ./tools/lint/lint.py --exceptions lint.exceptions "$CHANGED" + + build: + name: Build generated tests + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + cache: pip + - name: Install dependencies for generation tool + run: | + python -m pip install --upgrade pip + pip install -r tools/generation/requirements.txt + - name: Install dependencies for regexp-generator tool + run: | + cd tools/regexp-generator + npm install + - name: Test the generation tool + run: ./tools/generation/test/run.py + - name: Build tests + run: | + ./make.py clean >/dev/null + ./make.py + - name: Verify changes + - uses: tj-actions/verify-changed-files@v20 + with: + fail-if-changed: true + fail-message: | + New changes were found after re-generating the tests. + Please read the documentation on procedurally generated tests + https://github.com/tc39/test262/blob/HEAD/CONTRIBUTING.md#procedurally-generated-tests diff --git a/tools/scripts/ci_build.sh b/tools/scripts/ci_build.sh deleted file mode 100755 index 4dbab0f5e6..0000000000 --- a/tools/scripts/ci_build.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -if [ "$CIRCLE_PULL_REQUEST" != "" ]; then - ./make.py clean > /dev/null -fi -./make.py || exit $? - -if [ -n "$(git status --porcelain)" -a "$CIRCLE_PULL_REQUEST" != "" ]; then - echo New changes were found after re-generating the tests. - echo "" - git status --porcelain; - echo "" - git diff; - echo "" - echo Please, read the documentation on procedurally generated tests - echo 'https://github.com/tc39/test262/blob/HEAD/CONTRIBUTING.md#procedurally-generated-tests' - exit 1 -fi