name: PR Python Poetry on: pull_request: branches: [ "main" ] jobs: build: runs-on: labels: ["docker"] container: image: python:3.11.8 steps: - uses: actions/checkout@v4 with: fetch-depth: '0' - name: Install poetry run: | python -m pip install --upgrade pip pip install poetry huggingface_hub[cli] - name: Login to huggingface env: HUGGINGFACE_TOKEN: ${{ secrets.HUGGINGFACE_TOKEN }} run: | huggingface-cli login --token=${HUGGINGFACE_TOKEN} - name: Install dependencies run: | poetry update poetry install - name: Lint with Ruff run: | pip install ruff ruff check . --output-format=github continue-on-error: true - name: Test with pytest env: APP_ENV: "dev" HUGGINGFACE_TOKEN: ${{ secrets.HUGGINGFACE_TOKEN }} HUGGINGFACE_ACCESS_TOKEN: ${{ secrets.HUGGINGFACE_TOKEN }} API_KEY: ${{ secrets.API_KEY }} HF_HUB_CACHE: "/home/.cache/huggingface" run: poetry run pytest --cov=. continue-on-error: false