File: update-plugin-list.yml

package info (click to toggle)
pytest 9.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,308 kB
  • sloc: python: 65,808; makefile: 45
file content (69 lines) | stat: -rw-r--r-- 1,989 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Update Plugin List

on:
  schedule:
    # At 00:00 on Sunday.
    # https://crontab.guru
    - cron: '0 0 * * 0'
  workflow_dispatch:

# Set permissions at the job level.
permissions: {}

jobs:
  update-plugin-list:
    if: github.repository_owner == 'pytest-dev'
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write

    steps:
      - name: Checkout
        uses: actions/checkout@v5
        with:
          fetch-depth: 0
          persist-credentials: false

      - name: Setup Python
        uses: actions/setup-python@v6
        with:
          python-version: "3.13"

      - name: requests-cache
        uses: actions/cache@v4
        with:
          path: ~/.cache/pytest-plugin-list/
          key: plugins-http-cache-${{ github.run_id }} # Can use time based key as well
          restore-keys: plugins-http-cache-

      - name: Install tox
        run: |
          python -m pip install --upgrade pip
          pip install --upgrade tox

      - name: Update Plugin List
        run: tox -e update-plugin-list

      - name: Create Pull Request
        id: pr
        uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e
        with:
          commit-message: '[automated] Update plugin list'
          author: 'pytest bot <pytestbot@users.noreply.github.com>'
          branch: update-plugin-list/patch
          delete-branch: true
          branch-suffix: short-commit-hash
          title: '[automated] Update plugin list'
          body: '[automated] Update plugin list'
          draft: true

      - name: Instruct the maintainers to trigger CI by undrafting the PR
        env:
          GITHUB_TOKEN: ${{ github.token }}
          PULL_REQUEST_NUMBER: ${{ steps.pr.outputs.pull-request-number }}
        run: >-
          gh pr comment
          --body 'Please mark the PR as ready for review to trigger PR checks.'
          --repo '${{ github.repository }}'
          "$PULL_REQUEST_NUMBER"