File: pr.yml

package info (click to toggle)
asyncio-dgram 3.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 192 kB
  • sloc: python: 550; makefile: 42
file content (60 lines) | stat: -rw-r--r-- 1,581 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
name: Check Pull Request
on: pull_request

jobs:
  lint:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
    - name: Setup uv
      uses: astral-sh/setup-uv@v6
      with:
        enable-cache: true
        python-version: "3.14"
    - name: Sync Environment
      run: make sync
    - name: Lint
      run: make lint
    - name: Format
      run: make check-format
    - name: Type Check
      run: make type-check

  gather-pr-commits:
    runs-on: ubuntu-latest
    outputs:
      shas: ${{ steps.get-shas.outputs.shas }}
    steps:
      - uses: jsbronder/actions/get-pr-shas@v1
        id: get-shas

  test-commits:
    runs-on: ubuntu-latest
    needs: gather-pr-commits
    permissions:
      contents: read
      statuses: read
    strategy:
      fail-fast: false
      matrix:
        sha: ${{ fromJson(needs.gather-pr-commits.outputs.shas) }}
        command: ["make test"]
        python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: ${{ needs.gather-pr-commits.outputs.shas }}
      - name: Setup uv
        uses: astral-sh/setup-uv@v6
        with:
          enable-cache: true
          python-version: ${{ matrix.python }}
      - name: Sync Environment
        run: make sync
      - name: py${{ matrix.python }}/${{ matrix.command }}/${{ matrix.sha }}
        uses: jsbronder/actions/test-commit@v1
        with:
          sha: ${{ matrix.sha }}
          context: check/${{ matrix.python }}/${{ matrix.command }}
          command: ${{ matrix.command }}