summaryrefslogtreecommitdiffhomepage
path: root/.circleci/config.yml
blob: 7214201cb22df6d0009409e28ef6b16fb5cb6765 (plain)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
version: 2.1


orbs:
  orb: invocations/orb@1.3.1


jobs:
  sdist-test-suite:
    executor:
      name: orb/default
      version: "3.6"
    steps:
      - orb/setup
      - run: inv release.build --no-wheel --directory .
      - run: |
          cd dist
          tar xzvf *.tar.gz
          rm -v *.tar.gz
          cd paramiko-*
          pip install -e .
          inv -e test
      - orb/debug

  kerberos:
    executor:
      name: orb/default
      version: "3.6"
    steps:
      - orb/setup
      # Required to actually see all of universe/multiverse :(
      - run: sudo apt update
      # System reqs to install/build gssapi c-ext & friends (who only
      # appear to offer wheels for Windows)
      - run: sudo apt install -y libkrb5-dev krb5-admin-server krb5-kdc 
      # Our gssapi-supporting flavor, eg gssapi, pyasn1 etc
      - run: pip install -e '.[gssapi]'
      # Test-only deps for Kerberos (if they are importable it triggers
      # running the kerberos tests instead of skipping them)
      - run: pip install k5test
      # Do the thing, win the points!
      - run: inv test
      - orb/debug

  # TODO: move to orb, rub on other projects too
  spellcheck:
    executor:
      name: orb/default
      version: "3.6"
    steps:
      - orb/setup
      - run: codespell
      - orb/debug


workflows:
  main:
    jobs:
      # The basics
      - orb/lint:
          name: Lint
      - orb/format:
          name: Style check
      - spellcheck:
          name: Spellcheck
      # Main test run, w/ coverage, and latest-supported cryptography
      - orb/coverage:
          name: Test
      # Non-coverage runs w/ other crypto versions.
      # (Phrased as 2-dimensional matrix but 3.6 only for now to save credits)
      - orb/test:
          name: Test << matrix.version >> w/ << matrix.pip-overrides >>
          matrix:
            parameters:
              version: ["3.6"]
              # TODO: I don't see a nicer way to do this that doesn't require
              # making the orb know too much about its client code...
              # TODO: the upper end of this needs to change and/or grow more
              # cells, periodically
              # TODO: see if there's a non shite way to use bucketing here,
              # somewhere between yaml, pip and bash all escapes get fucky
              pip-overrides: ["cryptography==3.3.2", "cryptography==39.0.0"]
      # Kerberos tests. Currently broken :(
      #- kerberos:
      #    name: Test 3.6 w/ Kerberos support
      #    # No point testing k5 if base tests already fail
      #    requires: ["Test 3.6 (w/ coverage, latest crypto)"]
      - orb/test-release:
          name: Release test
      # Ensure test suite is included in sdist & functions appropriately
      - sdist-test-suite:
          name: Test within sdist
          requires:
            - "Test"
            - "Release test"
      # Test other interpreters if main passed
      - orb/test:
          name: Test << matrix.version >>
          requires: ["Test"]
          matrix:
            parameters:
              version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
      # Test doc building if main test suite passed (no real reason to spend
      # all those credits if the main tests would also fail...)
      - orb/docs:
          name: "Docs"
          requires: ["Test"]