mirror of
https://github.com/tc39/test262.git
synced 2025-07-21 21:14:45 +02:00
Migrate test generation workflow to GitHub Actions
This runs faster and allows for future improvements. Similar to the linter workflow, we remove the Circle-CI-specific stuff from the file in tools/scripts/, and into .github/workflows/. We use another external action (tj-actions/verify-changed-files) to check that generating the tests didn't create any new changes. This is basically a companion action to the tj-actions/changed-files used in the linter job.
This commit is contained in:
parent
15b7a780b3
commit
c73968aaaf
@ -37,21 +37,6 @@ execution_steps: &execution_steps
|
|||||||
- run: hostPath=$HOME/.esvu/bin/$hostPath npm run ci
|
- run: hostPath=$HOME/.esvu/bin/$hostPath npm run ci
|
||||||
|
|
||||||
jobs:
|
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
|
|
||||||
"V8: New or modified tests execution":
|
"V8: New or modified tests execution":
|
||||||
docker:
|
docker:
|
||||||
- image: *node_image
|
- image: *node_image
|
||||||
@ -123,9 +108,6 @@ jobs:
|
|||||||
<<: [*execution_steps]
|
<<: [*execution_steps]
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
Tools:
|
|
||||||
jobs:
|
|
||||||
- "Test262: verify tools; build tests"
|
|
||||||
Tests execution:
|
Tests execution:
|
||||||
jobs:
|
jobs:
|
||||||
# - "ChakraCore: New or modified tests execution"
|
# - "ChakraCore: New or modified tests execution"
|
||||||
|
33
.github/workflows/checks-main.yml
vendored
33
.github/workflows/checks-main.yml
vendored
@ -26,3 +26,36 @@ jobs:
|
|||||||
|
|
||||||
- name: Lint all tests
|
- name: Lint all tests
|
||||||
run: ./tools/lint/lint.py test/
|
run: ./tools/lint/lint.py test/
|
||||||
|
|
||||||
|
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: Test the generation tool
|
||||||
|
run: ./tools/generation/test/run.py
|
||||||
|
|
||||||
|
- name: Build tests
|
||||||
|
run: ./tools/scripts/ci_build.sh
|
||||||
|
|
||||||
|
- 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
|
||||||
|
34
.github/workflows/checks-pr.yml
vendored
34
.github/workflows/checks-pr.yml
vendored
@ -46,3 +46,37 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
awk -F': ' <errors.out \
|
awk -F': ' <errors.out \
|
||||||
"{ sub(\"$(pwd)/\", \"\"); printf \"::error file=%s,line=1::%s\n\", \$1, \$2 }"
|
"{ sub(\"$(pwd)/\", \"\"); printf \"::error file=%s,line=1::%s\n\", \$1, \$2 }"
|
||||||
|
|
||||||
|
|
||||||
|
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: Test the generation tool
|
||||||
|
run: ./tools/generation/test/run.py
|
||||||
|
|
||||||
|
- name: Build tests
|
||||||
|
run: ./tools/scripts/ci_build.sh
|
||||||
|
|
||||||
|
- 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
|
||||||
|
@ -1,17 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if [ "$CIRCLE_PULL_REQUEST" != "" ]; then
|
./make.py clean > /dev/null
|
||||||
./make.py clean > /dev/null
|
|
||||||
fi
|
|
||||||
./make.py
|
./make.py
|
||||||
|
|
||||||
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
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user