Bump pytest from 8.4.2 to 9.0.1 in /demos #1382
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: Dependabot post-update (rebuild moderator model) | ||
| on: | ||
| pull_request_target: | ||
| action: [opened, synchronize, reopened] | ||
| branches: | ||
| - 'master' | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: true | ||
| permissions: {} | ||
| jobs: | ||
| post-update: | ||
| permissions: | ||
| pull-requests: read # for gh pr checkout | ||
| contents: write # to push code in repo (stefanzweifel/git-auto-commit-action) | ||
| if: github.actor == 'dependabot[bot]' && contains(github.event.pull_request.title, 'scikit-learn') | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Generate token | ||
| id: generate_token | ||
| uses: tibdex/github-app-token@v2 | ||
| with: | ||
| app_id: ${{ secrets.BOT_APP_ID }} | ||
| private_key: ${{ secrets.BOT_PRIVATE_KEY }} | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| token: ${{ steps.generate_token.outputs.token }} | ||
| - name: Login | ||
| run: | | ||
| echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token | ||
| - name: Checkout | ||
| run: | | ||
| gh pr checkout ${{ github.event.pull_request.number }} | ||
| - name: Setup Python | ||
| uses: actions/setup-python@v6 | ||
| cache: 'pip' | ||
| cache-dependency-path: '**/requirements*.txt' | ||
| - name: Download train.csv | ||
| # Original file can be found at: https://www.kaggle.com/code/piumallick/toxic-comments-sentiment-analysis/input?select=train.csv.zip | ||
| run: curl "$MODERATOR_TRAINING_URL" > train.csv | ||
| - name: Rebuild model | ||
| run: PYTHONPATH='demos/moderator' python -m moderator.build_model train.csv | ||
| - name: Commit and push if needed | ||
| uses: stefanzweifel/git-auto-commit-action@v7 | ||
| with: | ||
| commit_message: Rebuild moderator model | ||
| file_pattern: 'demos/moderator/model/pipeline.dat' | ||