File: test.yml

package info (click to toggle)
python-pygraphviz 1.14-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 764 kB
  • sloc: ansic: 5,100; python: 2,669; makefile: 64
file content (197 lines) | stat: -rw-r--r-- 6,077 bytes parent folder | download | duplicates (2)
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
name: test

on: [push, pull_request]

env:
  WIN_GRAPHVIZ_URL: "https://gitlab.com/graphviz/graphviz/-/package_files/6164164/download"
  WIN_GRAPHVIZ_EXE: "C:\\Temp\\graphviz-install-2.46.0-win64.exe"
  WIN_GRAPHVIZ_DIR: "C:\\Program Files\\Graphviz"

jobs:
  ubuntu:
    runs-on: Ubuntu-latest

    strategy:
      matrix:
        python-version: ["3.10", "3.11", "3.12", "3.13-dev", "pypy-3.10"]

    steps:
      - name: Checkout pygraphviz
        uses: actions/checkout@v4

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

      - name: Update apt-get
        run: sudo apt-get update

      - name: Install graphviz
        run: sudo apt-get install graphviz graphviz-dev

      - name: Install packages
        run: |
          pip install --upgrade pip
          pip install -r requirements/test.txt
          pip install .
          pip list

      - name: Test pygraphviz
        run: |
          pytest --doctest-modules --durations=10 --pyargs pygraphviz

  fedora:
    strategy:
      matrix:
        release:
          - 39
          - 40

    runs-on: Ubuntu-latest
    container: "fedora:${{ matrix.release }}"

    steps:
      - name: Checkout pygraphviz
        uses: actions/checkout@v4

      - name: Install graphviz
        run: sudo dnf install --nogpg -y graphviz graphviz-devel

      - name: Install Python developer tools
        run: sudo dnf install --nogpg -y python3-devel

      - name: Install gcc
        run: sudo dnf install -y --nogpg gcc

      - name: Install packages
        run: |
          pip install --upgrade pip
          pip install -r requirements/test.txt
          pip install .
          pip list

      - name: Test pygraphviz
        run: |
          pytest --doctest-modules --durations=10 --pyargs pygraphviz

  brew:
    runs-on: macOS-latest

    strategy:
      matrix:
        python-version: ["3.10", "3.11", "3.12", "3.13-dev"]

    steps:
      - name: Checkout pygraphviz
        uses: actions/checkout@v4

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

      - name: Install graphviz
        run: brew install graphviz

      - name: Install packages
        run: |
          pip install --upgrade pip
          pip install -r requirements/test.txt
          pip install --config-settings="--global-option=build_ext" \
                      --config-settings="--global-option=-I$(brew --prefix graphviz)/include/" \
                      --config-settings="--global-option=-L$(brew --prefix graphviz)/lib/" \
                      .
          pip list

      - name: Test pygraphviz
        run: |
          pytest --doctest-modules --durations=10 --pyargs pygraphviz

  macports:
    runs-on: macOS-latest

    strategy:
      matrix:
        python-version: ["3.10", "3.11", "3.12", "3.13-dev"]

    steps:
      - name: Checkout pygraphviz
        uses: actions/checkout@v4

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

      - name: Download macports pkg
        run: wget https://github.com/macports/macports-base/releases/download/v2.9.3/MacPorts-2.9.3-14-Sonoma.pkg

      - name: Install macports
        run: sudo installer -pkg MacPorts-2.9.3-14-Sonoma.pkg -target /

      - name: Install graphviz
        run: sudo /opt/local/bin/port install graphviz

      - name: Install packages
        run: |
          pip install --upgrade pip setuptools
          pip install -r requirements/test.txt
          pip install --config-settings="--global-option=build_ext" \
                      --config-settings="--global-option=-I/opt/local/include/" \
                      --config-settings="--global-option=-L/opt/local/lib/" \
                      .
          pip list

      - name: Test pygraphviz
        run: |
          export PATH=/opt/local/bin:/opt/local/sbin:$PATH
          pytest --doctest-modules --durations=10 --pyargs pygraphviz

  windows:
    runs-on: windows-latest

    strategy:
      matrix:
        python-version: ["3.10", "3.11", "3.12", "3.13-dev"]

    steps:
      - name: Checkout pygraphviz
        uses: actions/checkout@v4

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

      # This and the following step need to be changed when Graphviz has new releases.
      - name: Download graphviz source
        run: Invoke-WebRequest -Uri $env:WIN_GRAPHVIZ_URL -OutFile $env:WIN_GRAPHVIZ_EXE

      - name: Install exe
        run: Start-Process -Wait -FilePath $env:WIN_GRAPHVIZ_EXE -ArgumentList '/S' -PassThru

      - name: Update path
        run: echo "$($env:WIN_GRAPHVIZ_DIR)\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

      # We need ``python -m pip install -U pip`` b/c Windows won't modify running programs.
      - name: Install packages
        run: |
          python -m pip install --upgrade pip
          python -m pip install -r requirements/test.txt
          python -m pip install --config-settings="--global-option=build_ext" `
            --config-settings="--global-option=-I$($env:WIN_GRAPHVIZ_DIR)\include" `
            --config-settings="--global-option=-L$($env:WIN_GRAPHVIZ_DIR)\lib" `
            .
          python -m pip list

      # We are leaving this in to help us remember some useful PowerShell syntax.
      # The following commands are also helpful for debugging:  Copy-Item, Get-Content
      - name: List
        run: Get-ChildItem "$($env:WIN_GRAPHVIZ_DIR)\bin"

      # Set PY_IGNORE_IMPORTMISMATCH b/c otherwise --doctest-modules is confused.
      - name: Test pygraphviz
        run: |
          [Environment]::SetEnvironmentVariable("PY_IGNORE_IMPORTMISMATCH", 1)
          pytest --doctest-modules --durations=10 --pyargs pygraphviz