Skip to content

Commit b82a5d3

Browse files
committed
[Breaking Change] (config) Add setup Python to each actions and add checkout process in 'push_to_pypi'.
1 parent 7bd9df6 commit b82a5d3

File tree

1 file changed

+65
-31
lines changed

1 file changed

+65
-31
lines changed

.github/workflows/ci-cd-master.yml

Lines changed: 65 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ jobs:
7777

7878
- name: Install Python ${{ matrix.python-version }} dependencies
7979
run: |
80-
python -m pip install --upgrade pip
81-
pip install -U pip
82-
pip install codecov
83-
pip install -U pytest
84-
pip install -U pytest-cov
85-
pip install pytest-rerunfailures
86-
pip install -r dev-requirements.txt
80+
python3 -m pip install --upgrade pip
81+
pip3 install -U pip
82+
pip3 install codecov
83+
pip3 install -U pytest
84+
pip3 install -U pytest-cov
85+
pip3 install pytest-rerunfailures
86+
pip3 install -r dev-requirements.txt
8787
8888
- name: Change the setting of option *open files* of resource limit
8989
run: |
@@ -190,14 +190,14 @@ jobs:
190190

191191
- name: Install Python ${{ matrix.python-version }} dependencies
192192
run: |
193-
python -m pip install --upgrade pip
194-
pip install -U pip
195-
pip install codecov
196-
pip install -U pytest
197-
pip install -U pytest-cov
198-
pip install pytest-rerunfailures
199-
pip install mysql-connector-python
200-
pip install -r dev-requirements.txt
193+
python3 -m pip install --upgrade pip
194+
pip3 install -U pip
195+
pip3 install codecov
196+
pip3 install -U pytest
197+
pip3 install -U pytest-cov
198+
pip3 install pytest-rerunfailures
199+
pip3 install mysql-connector-python
200+
pip3 install -r dev-requirements.txt
201201
202202
- name: Run tests with pytest
203203
run: pytest ${{ matrix.test-path }}
@@ -227,11 +227,16 @@ jobs:
227227
name: coverage
228228
path: .coverage.unit-test*
229229

230+
- name: Setup Python 3.10 in Ubuntu OS
231+
uses: actions/setup-python@v2
232+
with:
233+
python-version: '3.10'
234+
230235
- name: Install Python tool 'coverage'
231236
run: |
232-
python -m pip install --upgrade pip
233-
pip install -U pip
234-
pip install coverage
237+
python3 -m pip install --upgrade pip
238+
pip3 install -U pip
239+
pip3 install coverage
235240
236241
- name: Combine all code coverage result files
237242
run: coverage combine .coverage.*
@@ -334,11 +339,16 @@ jobs:
334339
name: coverage
335340
path: .coverage.integration-test*
336341

342+
- name: Setup Python 3.10 in Ubuntu OS
343+
uses: actions/setup-python@v2
344+
with:
345+
python-version: '3.10'
346+
337347
- name: Install Python tool 'coverage'
338348
run: |
339-
python -m pip install --upgrade pip
340-
pip install -U pip
341-
pip install coverage
349+
python3 -m pip install --upgrade pip
350+
pip3 install -U pip
351+
pip3 install coverage
342352
343353
- name: Combine all code coverage result files
344354
run: coverage combine .coverage.*
@@ -360,11 +370,16 @@ jobs:
360370
name: coverage
361371
path: .coverage.*
362372

373+
- name: Setup Python 3.10 in Ubuntu OS
374+
uses: actions/setup-python@v2
375+
with:
376+
python-version: '3.10'
377+
363378
- name: Install Python tool 'coverage'
364379
run: |
365-
python -m pip install --upgrade pip
366-
pip install -U pip
367-
pip install coverage
380+
python3 -m pip install --upgrade pip
381+
pip3 install -U pip
382+
pip3 install coverage
368383
369384
- name: Combine all code coverage result files
370385
run: coverage combine .coverage.*
@@ -412,19 +427,24 @@ jobs:
412427
- name: Checkout
413428
uses: actions/checkout@v2
414429

430+
- name: Setup Python 3.10 in Ubuntu OS
431+
uses: actions/setup-python@v2
432+
with:
433+
python-version: '3.10'
434+
415435
- name: Install Python dependencies
416436
run: |
417-
python -m pip install --upgrade pip
418-
pip install -U pip
419-
pip install -U setuptools
420-
pip install wheel
437+
python3 -m pip install --upgrade pip
438+
pip3 install -U pip
439+
pip3 install -U setuptools
440+
pip3 install wheel
421441
422442
- name: Install MultiRunnable with by setup.py
423443
run: |
424-
python setup.py install --user || exit 1
444+
python3 setup.py install --user || exit 1
425445
426446
- name: Show the Python package information
427-
run: pip show multirunnable
447+
run: pip3 show multirunnable
428448

429449
- name: Test to run script with package 'multirunnable' in command lines
430450
run: |
@@ -436,7 +456,7 @@ jobs:
436456
shell: python
437457

438458
- name: Test to run script with package 'multirunnable' with Python file
439-
run: python ./scripts/mr_script.py
459+
run: python3 ./scripts/mr_script.py
440460

441461

442462
build_package:
@@ -446,6 +466,11 @@ jobs:
446466
- name: Checkout
447467
uses: actions/checkout@v2
448468

469+
- name: Setup Python 3.10 in Ubuntu OS
470+
uses: actions/setup-python@v2
471+
with:
472+
python-version: '3.10'
473+
449474
- name: Install Python dependencies
450475
run: |
451476
python3 -m pip install --upgrade pip
@@ -468,13 +493,21 @@ jobs:
468493
needs: build_package
469494
runs-on: ubuntu-latest
470495
steps:
496+
- name: Checkout
497+
uses: actions/checkout@v2
498+
471499
- name: Download Python package files
472500
uses: actions/download-artifact@v3
473501
with:
474502
name: MultiRunnable-Python-Package
475503
path: ./dist/MultiRunnable-*
476504
if-no-files-found: error
477505

506+
- name: Setup Python 3.10 in Ubuntu OS
507+
uses: actions/setup-python@v2
508+
with:
509+
python-version: '3.10'
510+
478511
- name: Install Python dependencies
479512
run: |
480513
python3 -m pip install --upgrade pip
@@ -483,6 +516,7 @@ jobs:
483516
pip3 install wheel
484517
pip3 install twine
485518
pip3 install -U urllib3 requests
519+
ls -la ./dist
486520
487521
- name: Push Python package to PyPI
488522
run: python3 -m twine upload ./dist/MultiRunnable-*

0 commit comments

Comments
 (0)