Skip to content

Commit

Permalink
Run new CI checks for changed parts
Browse files Browse the repository at this point in the history
  • Loading branch information
Kjell Morgenstern committed Jun 20, 2024
1 parent 62e21ea commit ad7c6d8
Showing 1 changed file with 78 additions and 4 deletions.
82 changes: 78 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install requirements
run: pip install -r scripts/requirements.txt
- name: Avoid non acsii in part and svg filenames
- name: Avoid non-ASCII in part and SVG filenames
run: python scripts/checkascii.py .
- name: Check that image filenames use same case
run: python scripts/checkcase.py
Expand Down Expand Up @@ -49,3 +50,76 @@ jobs:
fzb -version
- name: Fzp validate
run: fzp validate --dir ./core

check_modified_files_merge:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install requirements
run: pip install --no-cache-dir -r scripts/checks/requirements.txt
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
since_last_remote_commit: true
files: |
**/*.fzp
**/*.svg
files_ignore: |
**/obsolete/**
write_output_files: true
- name: List changed files
run: cat .github/outputs/all_changed_files.txt
- name: Run fzp checker
run: python scripts/checks/fzp_checker_runner.py . -f .github/outputs/all_changed_files.txt -v

check_modified_files_default:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install requirements
run: pip install --no-cache-dir -r scripts/checks/requirements.txt
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
since_last_remote_commit: true
files: |
**/*.fzp
**/*.svg
files_ignore: |
**/obsolete/**
write_output_files: true
- name: List changed files
run: cat .github/outputs/all_changed_files.txt
- name: Run fzp checker
run: python scripts/checks/fzp_checker_runner.py . -f .github/outputs/all_changed_files.txt -v

checker_unit_test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install requirements
run: |
cd scripts/checks
pip install --no-cache-dir -r requirements.txt
- name: Run pytest
run: python -m pytest
working-directory: scripts/checks

0 comments on commit ad7c6d8

Please sign in to comment.