mirror of
https://github.com/tc39/test262.git
synced 2025-07-22 21:45:04 +02:00
Test tools only if they were modified
Most of the time, we are not committing changes to the tools. Move the unit tests for the lint and generation tools to a separate PR workflow, that is only run if anything in the tools/ folder is modified in the PR. This saves time in the normal case.
This commit is contained in:
parent
b292eb95c3
commit
7f4aa49ccd
6
.github/workflows/checks-main.yml
vendored
6
.github/workflows/checks-main.yml
vendored
@ -21,9 +21,6 @@ jobs:
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r tools/lint/requirements.txt
|
||||
|
||||
- name: Test the lint tool
|
||||
run: ./tools/lint/test/run.py
|
||||
|
||||
- name: Lint all tests
|
||||
run: ./tools/lint/lint.py test/
|
||||
|
||||
@ -45,9 +42,6 @@ jobs:
|
||||
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: |
|
||||
./make.py clean >/dev/null
|
||||
|
6
.github/workflows/checks-pr.yml
vendored
6
.github/workflows/checks-pr.yml
vendored
@ -21,9 +21,6 @@ jobs:
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r tools/lint/requirements.txt
|
||||
|
||||
- name: Test the lint tool
|
||||
run: ./tools/lint/test/run.py
|
||||
|
||||
- name: Identify new or changed tests
|
||||
id: changed_tests
|
||||
uses: tj-actions/changed-files@v45
|
||||
@ -66,9 +63,6 @@ jobs:
|
||||
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: |
|
||||
./make.py clean >/dev/null
|
||||
|
52
.github/workflows/test-tools.yml
vendored
Normal file
52
.github/workflows/test-tools.yml
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
name: Test tools
|
||||
|
||||
on:
|
||||
push:
|
||||
files:
|
||||
- 'tools/**'
|
||||
pull_request:
|
||||
files:
|
||||
- 'tools/**'
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Test the lint tool
|
||||
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
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r tools/lint/requirements.txt
|
||||
|
||||
- name: Test the lint tool
|
||||
run: ./tools/lint/test/run.py
|
||||
|
||||
generation:
|
||||
name: Test the generation tool
|
||||
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
|
Loading…
x
Reference in New Issue
Block a user