@@ -2,96 +2,31 @@ name: Ubuntu latest
22
33on : [ push, pull_request ]
44
5- jobs :
6- Python_37 :
7- runs-on : ubuntu-latest
8- steps :
9- - uses : actions/checkout@v3.0.2
10- - name : Update package list
11- run : sudo apt-get update
12- - name : Add Deadsnakes PPA
13- run : sudo add-apt-repository ppa:deadsnakes/ppa
14- - name : Install Python 3.7
15- run : sudo apt-get install -y python3.7
16- - name : Install dependencies
17- run : |
18- sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev pkg-config -y
19- python3 -m pip install --upgrade pip
20- python3 -m pip install pygame
21- python3 -m pip install .
22- - name : Run Tests
23- run : python3 -m unittest
24- - name : Remove Deadsnakes PPA
25- run : |
26- sudo add-apt-repository --remove ppa:deadsnakes/ppa
5+ concurrency :
6+ group : ${{ github.workflow }}-${{ github.ref }}
7+ cancel-in-progress : true
278
28- Python_38 :
29- runs-on : ubuntu-latest
30- steps :
31- - uses : actions/checkout@v3.0.2
32- - name : Update package list
33- run : sudo apt-get update
34- - name : Add Deadsnakes PPA
35- run : sudo add-apt-repository ppa:deadsnakes/ppa
36- - name : Install Python 3.8
37- run : sudo apt-get install -y python3.8
38- - name : Install dependencies
39- run : |
40- sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev pkg-config -y
41- python3 -m pip install --upgrade pip
42- python3 -m pip install pygame
43- python3 -m pip install .
44- - name : Run Tests
45- run : python3 -m unittest
46- - name : Remove Deadsnakes PPA
47- run : |
48- sudo add-apt-repository --remove ppa:deadsnakes/ppa
499
50- Python_39 :
51- runs-on : ubuntu-latest
52- steps :
53- - uses : actions/checkout@v3.0.2
54- - name : Install Python 3.9
55- run : |
56- sudo apt-get update
57- sudo apt-get install python3.9
58- - name : Install dependencies
59- run : |
60- sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev pkg-config -y
61- python3 -m pip install setuptools -U
62- python3 -m pip install pygame
63- python3 -m pip install .
64- - name : Run Tests
65- run : python3 -m unittest
66- Python_310 :
67- runs-on : ubuntu-latest
68- steps :
69- - uses : actions/checkout@v3.0.2
70- - name : Install Python 3.10
71- run : |
72- sudo apt-get update
73- sudo apt-get install python3.10
74- - name : Install dependencies
75- run : |
76- sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev pkg-config -y
77- python3 -m pip install setuptools -U
78- python3 -m pip install pygame
79- python3 -m pip install .
80- - name : Run Tests
81- run : python3 -m unittest
82- Python_311 :
10+ jobs :
11+ Python :
8312 runs-on : ubuntu-latest
13+ strategy :
14+ matrix :
15+ python-version : [3.7, 3.8, 3.9, '3.10', 3.11]
8416 steps :
8517 - uses : actions/checkout@v3.0.2
86- - name : Install Python 3.11
18+ - name : Install Python
8719 run : |
20+ # Add the deadsnakes PPA to install python
21+ sudo add-apt-repository ppa:deadsnakes/ppa
8822 sudo apt-get update
89- sudo apt-get install python3.11
23+ sudo apt-get install python${{ matrix.python-version }}-dev
24+ sudo apt-get install python${{ matrix.python-version }}-distutils
9025 - name : Install dependencies
9126 run : |
9227 sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev pkg-config -y
93- python3 -m pip install setuptools -U
94- python3 - m pip install pygame
95- python3 -m pip install .
28+ python${{ matrix.python-version }} -m pip install setuptools -U
29+ python${{ matrix.python-version }} - m pip install pygame-ce
30+ python${{ matrix.python-version }} -m pip install .
9631 - name : Run Tests
97- run : python3 -m unittest
32+ run : python${{ matrix.python-version }} -m unittest
0 commit comments