change workflow name #4
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
| name: tf-pre-commit | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| - main | |
| pull_request: | |
| branches: | |
| - dev | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["pypy3.10", "3.9", "3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Display Python version | |
| run: python -c "import sys; print(sys.version)" | |
| - name: Upgrade pip | |
| run: python -m pip install --upgrade pip pre-commit hatch | |
| - name: Install dependencies | |
| run: python -m pip install -r requirements.txt -r requirements_dev.txt | |
| - name: Install hooks | |
| run: pre-commit install | |
| - name: Run pre-commit hooks | |
| run: pre-commit run --all-files | |
| - name: Build tf-pre-commit python package | |
| run: hatch build | |
| - name: Install tf-pre-commit package | |
| run: python -m pip install . | |
| - name: Check tf-pre-commit version | |
| run: tf-fmt --version |