fix(datagen): remove remote_api from rule2code scripts (#20)
#89
This file contains hidden or 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
| # SPDX-FileCopyrightText: (c) UIUC PurpCode Team | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: CI | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| pre-commit: | |
| name: Pre-commit checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Needed for pre-commit to work properly | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Cache pre-commit environments | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pre-commit | |
| key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }} | |
| restore-keys: | | |
| pre-commit-${{ runner.os }}- | |
| - name: Install pre-commit | |
| run: pip install pre-commit | |
| - name: Run pre-commit on all files | |
| run: pre-commit run --all-files --show-diff-on-failure --color=always | |
| - name: Run pre-commit on changed files only (for PRs) | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| # Get the list of changed files | |
| git fetch origin ${{ github.base_ref }} | |
| pre-commit run --from-ref origin/${{ github.base_ref }} --to-ref HEAD --show-diff-on-failure --color=always |