-
Notifications
You must be signed in to change notification settings - Fork 20
151 lines (119 loc) · 3.7 KB
/
main.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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: Continuous Integration
on: [push, pull_request]
jobs:
functional_tests:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
name: functional tests
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: set node.js 22.x
uses: actions/setup-node@v3
with:
node-version: 22.x
- name: install dependencies
run: yarn
- name: run jest tests
run: yarn test
integration_tests_setup:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
name: "Integration Tests: Setup"
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup pyenv
id: pyenv
uses: ./
- name: list python versions
run: pyenv versions
- name: verify default installation
run: python --version
- name: list files in pyenv_root
run: ls -lhtr ${{ steps.pyenv.outputs.pyenv_root }}
integration_tests_caches_default:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
name: "Integration Tests: Caches Default"
steps:
- name: checkout
uses: actions/checkout@v4
- name: pyenv + python 3.7.16
id: pyenv
uses: ./
with:
default: 3.7.16
- name: pyenv + python 3.7.16 cached
id: pyenv2
uses: ./
with:
default: 3.7.16
- name: list python versions
run: pyenv versions
- name: verify default installation
run: python --version | grep 3.7.16
integration_tests_caches_versions:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
name: "Integration Tests: Caches Multiple Versions"
steps:
- name: checkout
uses: actions/checkout@v4
- name: pyenv + python 3.8.16 and 3.7.16
id: pyenv
uses: ./
with:
default: 3.7.16
command: |
pip install -U pip
pip install -U setuptools
versions: 3.8.16,
- name: display installed python versions
run: pyenv versions
- name: display installable python versions
run: pyenv install --list
- name: verify default installation
run: python --version
- name: verify python 3.8.16 installation
run: pyenv local 3.8.16 && python --version | grep 3.8.16
- name: verify python 3.7.16 installation
run: pyenv local 3.7.16 && python --version | grep 3.7.16
integration_test_run_commands_after_each_version_installation:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
name: "Integration Tests: Run commands after each version installation"
steps:
- name: checkout
uses: actions/checkout@v4
- name: python 3.7.16 and 3.8.16 with latest pip
id: pyenv
uses: ./
with:
default: 3.7.16
command: |
pip install -U pip
pip install -U setuptools
versions: 3.8.16,
- name: List python versions
run: pyenv versions
- name: verify default installation
run: test "$(python --version | awk '{ print $NF }')" = "3.7.16"
- name: verify 3.7.16 installation
run: pyenv local 3.8.16 && test "$(python --version | awk '{ print $NF }')" = "3.8.16"
- name: verify 3.8.16 installation
run: pyenv local 3.8.16 && test "$(python --version | awk '{ print $NF }')" = "3.8.16"
- name: verify pip version on python 3.7.16 installation
run: pyenv local 3.7.16 && test "$(pip --version | awk '{ print $2 }')" = "23.2.1"
- name: verify pip version on python 3.8.16 installation
run: pyenv local 3.8.16 && test "$(pip --version | awk '{ print $2 }')" = "23.2.1"