34 lines (30 loc) 路 1.2 KB
/
ubuntu_test.yml
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
name: Ubuntu latest
on: [ push, pull_request ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Python:
runs-on: ubuntu-latest
strategy:
fail-fast: false # if a particular matrix build fails, don't skip the rest
matrix:
python-version: [3.7, 3.8, 3.9, '3.10', 3.11]
steps:
- uses: actions/checkout@v4
- name: Install Python
run: |
# Add the deadsnakes PPA to install python
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python${{ matrix.python-version }}-dev
sudo apt-get install python${{ matrix.python-version }}-distutils
- name: Install dependencies
run: |
sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev pkg-config -y
python${{ matrix.python-version }} -m pip install --upgrade pip
python${{ matrix.python-version }} -m pip install wheel
python${{ matrix.python-version }} -m pip install pygame-ce
python${{ matrix.python-version }} -m pip install .
- name: Run Tests
run: python${{ matrix.python-version }} -m unittest