refactor: Optimize XLA flags configuration and environment setup #346
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: Lint | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: "pip" | |
| cache-dependency-path: pyproject.toml | |
| - name: Install linters | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ruff | |
| - name: Extract version from pyproject.toml | |
| id: meta | |
| run: | | |
| VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/') | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Run linters | |
| run: | | |
| ruff check easydel/ --config pyproject.toml | |
| env: | |
| EASYDEL_VERSION: ${{ steps.meta.outputs.version }} |