Skip to content

Commit

Permalink
ci: update release pipeline, add python 3.10
Browse files Browse the repository at this point in the history
- update action setup-python action to v2
- add python 3.10
  • Loading branch information
finswimmer authored Feb 8, 2022
1 parent c61bc9c commit 8eeeb61
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
strategy:
matrix:
os: [Ubuntu, MacOS, Windows]
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
python-version: ["2.7", "3.5","3.6", "3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,18 @@ jobs:
curl -L /~https://github.com/sdispater/python-binaries/releases/download/3.7.6/python-3.7.6.macos.tar.xz -o python-3.7.6.tar.xz
curl -L /~https://github.com/sdispater/python-binaries/releases/download/3.8.3/python-3.8.3.macos.tar.xz -o python-3.8.3.tar.xz
curl -L /~https://github.com/sdispater/python-binaries/releases/download/3.9.5/python-3.9.5.macos.tar.xz -o python-3.9.5.tar.xz
curl -L /~https://github.com/sdispater/python-binaries/releases/download/3.10.2/python-3.10.2.macos.tar.xz -o python-3.10.2.tar.xz
tar -zxf python-2.7.18.tar.xz
tar -zxf python-3.5.9.tar.xz
tar -zxf python-3.6.8.tar.xz
tar -zxf python-3.7.6.tar.xz
tar -zxf python-3.8.3.tar.xz
tar -zxf python-3.9.5.tar.xz
tar -zxf python-3.10.2.tar.xz
- name: Build specific release
run: |
source $HOME/.poetry/env
poetry run python sonnet make release --ansi -P "2.7:python-2.7.18/bin/python" -P "3.5:python-3.5.9/bin/python" -P "3.6:python-3.6.8/bin/python" -P "3.7:python-3.7.6/bin/python" -P "3.8:python-3.8.3/bin/python" -P "3.9:python-3.9.5/bin/python"
poetry run python sonnet make release --ansi -P "2.7:python-2.7.18/bin/python" -P "3.5:python-3.5.9/bin/python" -P "3.6:python-3.6.8/bin/python" -P "3.7:python-3.7.6/bin/python" -P "3.8:python-3.8.3/bin/python" -P "3.9:python-3.9.5/bin/python" -P "3.10:python-3.10.2/bin/python"
- name: Upload release file
uses: actions/upload-artifact@v1
with:
Expand Down Expand Up @@ -110,23 +112,25 @@ jobs:
Invoke-WebRequest /~https://github.com/sdispater/python-binaries/releases/download/3.7.6/python-3.7.6.windows.tar.xz -O python-3.7.6.tar.xz
Invoke-WebRequest /~https://github.com/sdispater/python-binaries/releases/download/3.8.3/python-3.8.3.windows.tar.xz -O python-3.8.3.tar.xz
Invoke-WebRequest /~https://github.com/sdispater/python-binaries/releases/download/3.9.5/python-3.9.5.windows.tar.xz -O python-3.9.5.tar.xz
Invoke-WebRequest /~https://github.com/sdispater/python-binaries/releases/download/3.10.2/python-3.10.2.windows.tar.xz -O python-3.10.2.tar.xz
7z x python-2.7.17.tar.xz
7z x python-3.5.4.tar.xz
7z x python-3.6.8.tar.xz
7z x python-3.7.6.tar.xz
7z x python-3.8.3.tar.xz
7z x python-3.9.5.tar.xz
7z x python-3.10.2.tar.xz
7z x python-2.7.17.tar
7z x python-3.4.4.tar
7z x python-3.5.4.tar
7z x python-3.6.8.tar
7z x python-3.7.6.tar
7z x python-3.8.3.tar
7z x python-3.9.5.tar
7z x python-3.10.2.tar
- name: Build specific release
run: |
$env:Path += ";$env:Userprofile\.poetry\bin"
poetry run python sonnet make release --ansi -P "2.7:python-2.7.17\python.exe" -P "3.5:python-3.5.4\python.exe" -P "3.6:python-3.6.8\python.exe" -P "3.7:python-3.7.6\python.exe" -P "3.8:python-3.8.3\python.exe" -P "3.9:python-3.9.5\python.exe"
poetry run python sonnet make release --ansi -P "2.7:python-2.7.17\python.exe" -P "3.5:python-3.5.4\python.exe" -P "3.6:python-3.6.8\python.exe" -P "3.7:python-3.7.6\python.exe" -P "3.8:python-3.8.3\python.exe" -P "3.9:python-3.9.5\python.exe" -P "3.10:python-3.10.2\python.exe"
- name: Upload release file
uses: actions/upload-artifact@v1
with:
Expand Down
1 change: 1 addition & 0 deletions make-nix-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ if [ "$OSTYPE" == "linux-gnu" ]; then
$PYTHON get-poetry.py -y
POETRY="$PYTHON $HOME/.poetry/bin/poetry"
RUNTIMES[5]="${PYTHON39:+-P "3.9:$PYTHON39"}"
RUNTIMES[6]="${PYTHON310:+-P "3.10:$PYTHON310"}"
else
$PYTHON -m pip install poetry -U
POETRY="$PYTHON -m poetry"
Expand Down
64 changes: 50 additions & 14 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ importlib-metadata = {version = "^1.6.0", python = "<3.8"}
[tool.poetry.dev-dependencies]
pytest = [
{version = "^4.1", python = "<3.5"},
{version = "^5.4.3", python = ">=3.5"}
{version = "^5.4.3", python = "~3.5"},
{version = "^6.2.5", python = ">=3.6"}
]
pytest-cov = "^2.5"
pytest-mock = "^1.9"
Expand Down
2 changes: 1 addition & 1 deletion tests/inspection/test_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def test_info_setup_complex(demo_setup_complex):
def test_info_setup_complex_pep517_error(mocker, demo_setup_complex):
mocker.patch(
"poetry.utils.env.VirtualEnv.run",
auto_spec=True,
autospec=True,
side_effect=EnvCommandError(CalledProcessError(1, "mock", output="mock")),
)

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
minversion = 3.3.0
isolated_build = True
envlist = py27, py35, py36, py37, py38
envlist = py27, py35, py36, py37, py38, py39, py310

[testenv]
whitelist_externals = poetry
Expand Down

0 comments on commit 8eeeb61

Please sign in to comment.