File: main.yml

package info (click to toggle)
python-uvicorn 0.38.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,932 kB
  • sloc: python: 9,184; sh: 48; makefile: 15
file content (60 lines) | stat: -rw-r--r-- 1,538 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: Test Suite

on:
  push:
    branches: ["main"]
  pull_request:
    branches: ["main"]

jobs:
  tests:
    name: "Python ${{ matrix.python-version }} ${{ matrix.os }}"
    runs-on: "${{ matrix.os }}"
    timeout-minutes: 10

    strategy:
      fail-fast: false
      matrix:
        python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]
        os: [windows-latest, ubuntu-latest, macos-latest]

    steps:
      - uses: "actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8" # v5.0.0

      - name: Install uv
        uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
        with:
          python-version: ${{ matrix.python-version }}
          enable-cache: ${{ matrix.os != 'windows-latest' }}

      - name: Install dependencies
        run: scripts/install
        shell: bash

      - name: Run linting checks
        run: scripts/check
        if: "${{ matrix.os == 'ubuntu-latest'}}"

      - name: "Build package & docs"
        run: scripts/build
        shell: bash

      - name: "Run tests"
        run: scripts/test
        shell: bash

      - name: "Enforce coverage"
        run: scripts/coverage
        shell: bash

  # https://github.com/marketplace/actions/alls-green#why
  check:
    if: always()
    needs: [tests]
    runs-on: ubuntu-latest
    steps:
      - name: Decide whether the needed jobs succeeded or failed
        uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
        with:
          jobs: ${{ toJSON(needs) }}