6
6
push :
7
7
tags :
8
8
# Only run this workflow for tags that start with 'v.' (release tags)
9
- - ' v* '
9
+ - " v* "
10
10
11
11
jobs :
12
12
test :
@@ -16,48 +16,48 @@ jobs:
16
16
strategy :
17
17
matrix :
18
18
os : [macos-latest, ubuntu-latest]
19
- python-version : ["3.9", "3. 10", "3.11", "3.12"]
19
+ python-version : ["3.10", "3.11", "3.12"]
20
20
21
21
runs-on : ${{ matrix.os }}
22
22
name : Test with Python ${{ matrix.python-version }} on ${{ matrix.os }}
23
23
24
24
steps :
25
- - name : Checkout Code
26
- uses : actions/checkout@v4
25
+ - name : Checkout Code
26
+ uses : actions/checkout@v4
27
27
28
- - name : Setup Python ${{ matrix.python-version }}
29
- uses : actions/setup-python@v5
30
- with :
31
- python-version : ${{ matrix.python-version }}
32
- cache : pip
28
+ - name : Setup Python ${{ matrix.python-version }}
29
+ uses : actions/setup-python@v5
30
+ with :
31
+ python-version : ${{ matrix.python-version }}
32
+ cache : pip
33
33
34
- - name : Install dependencies
35
- run : |
36
- python -m pip install --upgrade pip
37
- pip install -r requirements/requirements-test.txt
38
- pip install wheel
39
- # Install setuptools for Python 3.12 and above
40
- if [[ "$(python -c 'import sys; print(sys.version_info >= (3, 12))')" == "True" ]]; then
41
- pip install setuptools
42
- fi
34
+ - name : Install dependencies
35
+ run : |
36
+ python -m pip install --upgrade pip
37
+ pip install -r requirements/requirements-test.txt
38
+ pip install wheel
39
+ # Install setuptools for Python 3.12 and above
40
+ if [[ "$(python -c 'import sys; print(sys.version_info >= (3, 12))')" == "True" ]]; then
41
+ pip install setuptools
42
+ fi
43
43
44
- - name : Build and install aicodebot
45
- run : |
46
- python setup.py sdist bdist_wheel
47
- pip install dist/*.whl
44
+ - name : Build and install aicodebot
45
+ run : |
46
+ python setup.py sdist bdist_wheel
47
+ pip install dist/*.whl
48
48
49
- - name : Test
50
- run : |
51
- aicodebot -V
52
- # Python 3.9 testing fails because of an issue with vcrpy
53
- # https://github.com/kevin1024/vcrpy/issues/688
54
- if [[ "${{ matrix.python-version }}" == "3.9" ]]; then
55
- echo "Skipping tests for Python 3.9, running alignment instead"
56
- aicodebot configure
57
- aicodebot alignment
58
- else
59
- pytest --record-mode=new_episodes
60
- fi
49
+ - name : Test
50
+ run : |
51
+ aicodebot -V
52
+ # Python 3.9 testing fails because of an issue with vcrpy
53
+ # https://github.com/kevin1024/vcrpy/issues/688
54
+ if [[ "${{ matrix.python-version }}" == "3.9" ]]; then
55
+ echo "Skipping tests for Python 3.9, running alignment instead"
56
+ aicodebot configure
57
+ aicodebot alignment
58
+ else
59
+ pytest --record-mode=new_episodes
60
+ fi
61
61
62
62
pypi_release :
63
63
needs : test
@@ -68,29 +68,29 @@ jobs:
68
68
contents : write
69
69
70
70
steps :
71
- - name : Checkout Code
72
- uses : actions/checkout@v4
71
+ - name : Checkout Code
72
+ uses : actions/checkout@v4
73
73
74
- - name : Setup Python
75
- uses : actions/setup-python@v5
76
- with :
77
- python-version : 3.12
78
- cache : pip
74
+ - name : Setup Python
75
+ uses : actions/setup-python@v5
76
+ with :
77
+ python-version : 3.12
78
+ cache : pip
79
79
80
- - name : Build the package
81
- run : |
82
- pip install wheel twine setuptools
83
- python setup.py sdist bdist_wheel
80
+ - name : Build the package
81
+ run : |
82
+ pip install wheel twine setuptools
83
+ python setup.py sdist bdist_wheel
84
84
85
- - name : Publish to PyPi
86
- env :
87
- TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
88
- TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
89
- run : |
90
- twine check dist/*
91
- twine upload dist/*
85
+ - name : Publish to PyPi
86
+ env :
87
+ TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
88
+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
89
+ run : |
90
+ twine check dist/*
91
+ twine upload dist/*
92
92
93
- - name : Create GitHub Release
94
- uses : ncipollo/release-action@v1
95
- with :
96
- generateReleaseNotes : true
93
+ - name : Create GitHub Release
94
+ uses : ncipollo/release-action@v1
95
+ with :
96
+ generateReleaseNotes : true
0 commit comments