-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
76 lines (70 loc) · 2.61 KB
/
action.yaml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: mdanalysis-compatible-pythons
description: Get Python versions compatible with MDAnalysis
inputs:
release:
decription: Which release version to get compatible Python versions for
required: false
default: develop
include:
description: Python versions to additionally include in the Python version list output
required: false
default: '[]'
exclude:
description: Python versions to exclude from the Python version list output
required: false
default: '[]'
outputs:
python-versions:
description: List of compatible Python versions
value: "${{ steps.get-python-versions.outputs.python-versions }}"
latest-python:
description: Latest compatible Python version
value: "${{ steps.get-latest-python.outputs.latest-python }}"
oldest-python:
description: Oldest compatible Python version
value: "${{ steps.get-oldest-python.outputs.oldest-python }}"
stable-python:
description: Stable Python version (N-1 latest)
value: "${{ steps.get-stable-python.outputs.stable-python }}"
runs:
using: "composite"
steps:
- name: Current Python info
shell: bash
run: |
python --version
python3 --version
- name: get compatible python versions
id: get-python-versions
shell: bash
working-directory: "${{ github.action_path }}"
run: |
chmod a+x ./get_mda_python_range.py
pymatrix=$(./get_mda_python_range.py --release ${{ inputs.release }} --include ${{ toJSON(inputs.include) }} --exclude ${{ toJSON(inputs.exclude) }})
echo $pymatrix
echo "python-versions=${pymatrix}" >> $GITHUB_OUTPUT
- name: get latest python
id: get-latest-python
shell: bash
working-directory: "${{ github.action_path }}"
run: |
chmod a+x ./get_version.py
ver=$(./get_version.py --matrix ${{ toJSON(steps.get-python-versions.outputs.python-versions) }} --index 0)
echo $ver
echo "latest-python=${ver}" >> $GITHUB_OUTPUT
- name: get oldest python
id: get-oldest-python
working-directory: "${{ github.action_path }}"
shell: bash
run: |
ver=$(./get_version.py --matrix ${{ toJSON(steps.get-python-versions.outputs.python-versions) }} --index -1)
echo $ver
echo "oldest-python=${ver}" >> $GITHUB_OUTPUT
- name: get stable python
id: get-stable-python
working-directory: "${{ github.action_path }}"
shell: bash
run: |
ver=$(./get_version.py --matrix ${{ toJSON(steps.get-python-versions.outputs.python-versions) }} --index 1)
echo $ver
echo "stable-python=${ver}" >> $GITHUB_OUTPUT