Skip to content

Commit ffef3a1

Browse files
Refactor Python CI workflow for testing and pip removal
Updated GitHub Actions workflow to focus on testing and pip management.
1 parent e7e75d1 commit ffef3a1

File tree

1 file changed

+62
-20
lines changed

1 file changed

+62
-20
lines changed

.github/workflows/python-app.yml

Lines changed: 62 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,70 @@ name: Test
22

33
on: [push, pull_request, workflow_dispatch]
44

5-
concurrency:
6-
group: ${{ github.workflow }}-${{ github.ref }}
7-
cancel-in-progress: true
5+
# concurrency:
6+
# group: ${{ github.workflow }}-${{ github.ref }}
7+
# cancel-in-progress: true
88

9-
jobs:
10-
build:
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
python-version: ["pypy3.10", "3.13"]
16-
os: [windows-latest, macos-latest, ubuntu-latest, ubuntu-22.04-arm, ubuntu-24.04-arm, macos-13]
9+
# jobs:
10+
# build:
11+
# runs-on: ${{ matrix.os }}
12+
# strategy:
13+
# fail-fast: false
14+
# matrix:
15+
# python-version: ["pypy3.10", "3.13"]
16+
# os: [windows-latest, macos-latest, ubuntu-latest, ubuntu-22.04-arm, ubuntu-24.04-arm, macos-13]
17+
18+
# steps:
19+
# - uses: actions/checkout@v4
20+
21+
# - name: Set up Python ${{ matrix.python-version }}
22+
# uses: actions/setup-python@v5
23+
# # uses: mayeut/setup-python@pypy-aarch64
24+
# with:
25+
# python-version: ${{ matrix.python-version }}
1726

27+
# - name: Test
28+
# run: |
29+
# python --version --version
30+
31+
jobs:
32+
test:
33+
runs-on: ubuntu-latest
34+
1835
steps:
19-
- uses: actions/checkout@v4
36+
- name: Check out repository
37+
uses: actions/checkout@v4
38+
- name: Show pip version before uninstall
39+
run: |
40+
echo "Checking pip version before uninstall:"
41+
pip3 --version || echo "pip3 not found"
42+
43+
- name: Uninstall pip via apt
44+
run: sudo apt-get remove python3-pip -y
45+
46+
- name: Try uninstalling pip via pip (in case leftovers)
47+
run: pip3 uninstall pip -y || echo "pip3 uninstall may not work if pip is removed"
48+
49+
- name: Show pip version after uninstall
50+
run: |
51+
echo "Checking pip version after uninstall:"
52+
if command -v pip3; then
53+
echo "pip3 still exists!"
54+
pip3 --version
55+
exit 1
56+
else
57+
echo "pip3 successfully removed."
58+
fi
59+
- name: Set up Python
60+
uses: actions/setup-python@v5
61+
with:
62+
python-version: 3.13.9
63+
cache: 'pip'
2064

21-
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v5
23-
# uses: mayeut/setup-python@pypy-aarch64
24-
with:
25-
python-version: ${{ matrix.python-version }}
65+
- name: Display Python version
66+
run: python --version
2667

27-
- name: Test
28-
run: |
29-
python --version --version
68+
- name: Check pip
69+
run: |
70+
which pip
71+
pip --version

0 commit comments

Comments
 (0)