Skip to content

Commit 9ac38f6

Browse files
authored
GH Action: Setup Install (#15)
1 parent 99dbb64 commit 9ac38f6

File tree

2 files changed

+37
-10
lines changed

2 files changed

+37
-10
lines changed

.circleci/config.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
version: 2
22

33
jobs:
4-
try-setup-install:
5-
docker:
6-
- image: circleci/python:3.8
7-
steps:
8-
- checkout
9-
- run: |
10-
python3 -m virtualenv -p python3 env
11-
. env/bin/activate
12-
python setup.py install
134
examples:
145
docker:
156
- image: circleci/python:3.8
@@ -23,5 +14,4 @@ workflows:
2314
version: 2
2415
build_and_test:
2516
jobs:
26-
- try-setup-install
2717
- examples
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Try Setup Install
2+
3+
on: [push]
4+
5+
jobs:
6+
7+
gather-py3-versions:
8+
runs-on: ubuntu-latest
9+
outputs:
10+
matrix: ${{ steps.py3_versions.outputs.matrix }}
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Python Versions
14+
id: py3_versions
15+
run: |
16+
minmin_maxmax=$(grep -P "\(\(\d+, ?\d+\), ?\(\d+, ?\d+\)\)" -oh setup.py | sed 's/[^0-9]/ /g')
17+
IFS=', ' read -r -a array <<< "$minmin_maxmax"
18+
min_thru_max_series=$(for i in `seq ${array[1]} ${array[3]}`; do printf "3.$i,"; done | rev | cut -c 2- | rev)
19+
echo ::set-output name=matrix::{\"py3_versions\":[$(echo $min_thru_max_series)]}\"
20+
21+
setup-py-install:
22+
needs: gather-py3-versions
23+
runs-on: ubuntu-latest
24+
25+
strategy:
26+
max-parallel: 4
27+
fail-fast: false
28+
matrix: ${{ fromJSON(needs.gather-py3-versions.outputs.matrix) }}
29+
30+
steps:
31+
- uses: actions/checkout@v2
32+
- uses: actions/setup-python@v2
33+
with:
34+
python-version: ${{ matrix.py3_versions }}
35+
- run: |
36+
echo ${{ matrix.py3_versions }}
37+
python setup.py install

0 commit comments

Comments
 (0)