File: tests.yml

package info (click to toggle)
python-pyftpdlib 2.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,232 kB
  • sloc: python: 10,362; makefile: 346
file content (52 lines) | stat: -rw-r--r-- 1,676 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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

on: [push, pull_request]
name: tests
concurrency:
  group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.sha || '' }}
  cancel-in-progress: true
jobs:
  # Run unit tests
  tests:
    name: "py-${{ matrix.python-version }}, ${{ matrix.os }}"
    runs-on: ${{ matrix.os }}
    timeout-minutes: 20
    strategy:
      fail-fast: false
      matrix:
        python-version: ["3.13"]
        os: [ubuntu-latest, windows-latest, macos-latest]

    steps:
      - uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install pydeps ${{ matrix.os }}
        if: matrix.os == 'windows-latest'
        run: |
          python.exe -m pip install --upgrade pypiwin32 wmi pyopenssl psutil pytest pyasyncore pyasynchat
      - name: Install pydeps ${{ matrix.os }}
        if: matrix.os != 'windows-latest'
        run: |
          make install-pydeps-test

      - name: Tests
        run: |
          make test

  # Run linters
  linters:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-python@v5
    - name: 'Run linters'
      run: |
        python3 -m pip install --upgrade black ruff rstcheck toml-sort sphinx-rtd-theme
        python3 -m pip freeze
        make lint-all