8000 Add docs · keshgarg/setup-python@c85a107 · GitHub
[go: up one dir, main page]

Skip to content

Commit c85a107

author
Danny McCormick
authored
Add docs
1 parent 8d72de9 commit c85a107

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

README.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
11
# setup-python
22

3-
This action sets the python environment for use in actions
3+
This action sets up a python environment for use in actions by:
4+
5+
- optionally downloading and caching a version of python by version and adding to PATH
6+
- registering problem matchers for error output
7+
8+
# Usage
9+
10+
See [action.yml](action.yml)
11+
12+
Basic:
13+
```yaml
14+
actions:
15+
- uses: actions/setup-python@latest
16+
with:
17+
version: 3.x // Version range or exact version of a Python version to use, using semvers version range syntax.
18+
architecture: x64 // (x64 or x86)
19+
- run: python my_script.py
20+
```
21+
22+
Matrix Testing:
23+
```yaml
24+
jobs:
25+
build:
26+
strategy:
27+
matrix:
28+
python: [ 2.x, 3.x, pypy3 ]
29+
name: Python ${{ matrix.python }} sample
30+
actions:
31+
- name: Setup python
32+
uses: actions/setup-python@latest
33+
with:
34+
version: ${{ matrix.python }}
35+
architecture: x64
36+
- run: python my_script.py
37+
```
38+
39+
# License
40+
41+
The scripts and documentation in this project are released under the [MIT License](LICENSE)
42+
43+
# Contributions
44+
45+
Contributions are welcome! See [Contributor's Guide](docs/contributors.md)

0 commit comments

Comments
 (0)
0