@@ -8,22 +8,22 @@ on: [push, pull_request]
88jobs :
99 health :
1010 name : Check code health
11- runs-on : ubuntu-18.04
11+ runs-on : ubuntu-latest
1212 strategy :
1313 matrix :
14- python-version : [2.7 ]
14+ python-version : ["3.9", "3.10", "3.11", "3.12" ]
1515 steps :
1616 - name : Checkout pysap
17- uses : actions/checkout@v2
17+ uses : actions/checkout@v4
1818 - name : Setup Python ${{ matrix.python-version }}
19- uses : actions/setup-python@v2
19+ uses : actions/setup-python@v5
2020 with :
2121 python-version : ${{ matrix.python-version }}
2222 - name : Install dependencies
2323 run : |
24- python2 -m pip install --upgrade pip wheel
25- python2 -m pip install flake8 six
26- python2 -m pip install -r requirements.txt
24+ python -m pip install --upgrade pip wheel
25+ python -m pip install flake8
26+ python -m pip install -r requirements.txt
2727 - name : Run flake8 tests
2828 run : |
2929 flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
@@ -36,105 +36,96 @@ jobs:
3636 strategy :
3737 fail-fast : false
3838 matrix :
39- os : [ubuntu-18.04 , macos-latest]
40- python-version : [2.7 ]
39+ os : [ubuntu-latest , macos-latest]
40+ python-version : ["3.9", "3.10", "3.11", "3.12" ]
4141 experimental : [false]
4242 include :
4343 - os : windows-latest
44- python-version : 2.7
44+ python-version : " 3.12 "
4545 experimental : true
4646 steps :
4747 - name : Checkout pysap
48- uses : actions/checkout@v2
48+ uses : actions/checkout@v4
4949 - name : Setup Python ${{ matrix.python-version }}
50- uses : actions/setup-python@v2
50+ uses : actions/setup-python@v5
5151 with :
5252 python-version : ${{ matrix.python-version }}
5353
5454 - name : Install macOS dependencies
5555 if : runner.os == 'macOS'
5656 run : |
5757 brew install openssl libdnet libpcap
58- - name : Install Windows dependencies
59- if : runner.os == 'Windows'
60- run : |
61- choco install vcredist2008 -f -y
62- choco install dotnet3.5 -f -y
63- (New-Object System.Net.WebClient).DownloadFile("https://web.archive.org/web/20200803210206if_/https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi", "VCForPython27.msi")
64- msiexec.exe /i VCForPython27.msi ALLUSERS=1 /qn /norestart
6558
6659 - name : Install Python dependencies
6760 run : |
68- python -m pip install --upgrade pip wheel
61+ python -m pip install --upgrade pip wheel setuptools
6962 python -m pip install -r requirements.txt
7063
7164 - name : Run unit tests
7265 run : |
73- python setup.py test
66+ python -m pip install -e .
67+ python -m unittest discover -s tests -p '*_test.py'
7468
7569 - name : Build wheel artifact
7670 run : |
77- python setup.py bdist_wheel
71+ python -m pip install build
72+ python -m build --wheel
7873 - name : Upload wheel artifact
79- uses : actions/upload-artifact@v2
74+ uses : actions/upload-artifact@v4
8075 with :
81- name : packages
76+ name : packages-${{ matrix.os }}-${{ matrix.python-version }}
8277 path : dist/*.whl
8378
8479 docs :
8580 name : Build documentation and source package
86- runs-on : ubuntu-18.04
81+ runs-on : ubuntu-latest
8782 strategy :
8883 matrix :
89- python-version : [2.7 ]
84+ python-version : ["3.11" ]
9085 steps :
9186 - name : Checkout pysap
92- uses : actions/checkout@v2
87+ uses : actions/checkout@v4
9388 - name : Setup Python ${{ matrix.python-version }}
94- uses : actions/setup-python@v2
89+ uses : actions/setup-python@v5
9590 with :
9691 python-version : ${{ matrix.python-version }}
9792 - name : Install Linux dependencies
9893 run : |
99- sudo apt-get install pandoc texlive-latex-base ghostscript
94+ sudo apt-get update
95+ sudo apt-get install -y pandoc texlive-latex-base ghostscript
10096 - name : Install Python dependencies
10197 run : |
102- python2 -m pip install --upgrade pip wheel
103- python2 -m pip install -r requirements-docs.txt
98+ python -m pip install --upgrade pip wheel setuptools
99+ python -m pip install -r requirements-docs.txt
104100 - name : Install the library
105101 run : |
106- python2 setup.py install
107- - name : Pre-run documentation notebooks
108- run : |
109- python2 setup.py notebooks
102+ python -m pip install -e .
110103
111104 - name : Build source artifact
112105 run : |
113- python2 setup.py sdist
114-
115- - name : Build documentation
116- run : |
117- python2 setup.py doc
106+ python -m pip install build
107+ python -m build --sdist
118108
119109 - name : Upload source artifact
120- uses : actions/upload-artifact@v2
110+ uses : actions/upload-artifact@v4
121111 with :
122- name : packages
112+ name : packages-sdist
123113 path : dist/*.tar.gz
124114
125115 release :
126116 name : Release
127- runs-on : ubuntu-18.04
117+ runs-on : ubuntu-latest
128118 needs : [test, docs]
129119 env :
130120 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
131121 if : ${{ github.event_name == 'push' && startsWith(github.ref, 'v') }}
132122 steps :
133123 - name : Download artifacts
134- uses : actions/download-artifact@v2
124+ uses : actions/download-artifact@v4
135125 with :
136- name : packages
126+ pattern : packages-*
137127 path : dist
128+ merge-multiple : true
138129 - name : Create release and upload assets
139130 uses : meeDamian/github-release@2.0
140131 with :
0 commit comments