This repository has been archived by the owner on Nov 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathappveyor.yml
95 lines (81 loc) · 2.91 KB
/
appveyor.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
---
version: 0.1.2.{build}
image:
- Ubuntu
- Visual Studio 2019
environment:
# Python versions
# Windows: https://www.appveyor.com/docs/windows-images-software/#python
# Linux: https://www.appveyor.com/docs/linux-images-software/#python
matrix:
# Use a single global Python version for pipx/poetry/etc.
# Nox will handle specific python version testing
- PYTHON_WIN: C:/Python39
PYENV_38: 3.8.3
PYENV_39: 3.9.5
APPVEYOR_SAVE_CACHE_ON_ERROR: false
CODECOV_TOKEN: d414dacb-5b8d-4c0b-94e1-42fe8393187d
# To encrypt passwords, go to Account -> "Settings" -> "Encrypt YAML"
# Python is now managed with pyenv instead of stack so that a ".venv" is created
# > Must be after the declaration of "PYTHON_STACK" variable
# yamllint disable-line rule:line-length
# > https://help.appveyor.com/discussions/questions/32001-ubuntu-python-3-as-default
# > stack: python %PYTHON_STACK%
cache:
- .venv -> poetry.lock
- .nox -> poetry.lock
build: false
# Specify commands specific to platform (cmd-Windows/sh-Linux/None-Both)
install:
- echo "Install..."
# Force Python to use UTF-8 encoding instead of cp1252 on Windows
- cmd: SET PYTHONUTF8=1
# For Windows, set Python paths based on environment variable from matrix
- cmd: set PATH=%PYTHON_WIN%/Scripts;%PYTHON_WIN%;%PATH%
# Use pyenv instead of the venv-based Python from AppVeyor Ubuntu
- sh: curl https://pyenv.run | $SHELL
# exec "$SHELL" causes AppVeyor to stop, so manually configure paths
- sh: export PYENV_ROOT="$HOME/.pyenv"
- sh: export PATH="$PYENV_ROOT/bin:$PATH"
- sh: eval "$(pyenv init --path)"
# Configure Python versions with pyenv
- sh: pyenv install $PYENV_38 --skip-existing
- sh: pyenv install $PYENV_39 --skip-existing
- sh: pyenv global $PYENV_39
- sh: pyenv local $PYENV_39 $PYENV_38
# Check global Python version
- python --version
# Install pipx to manage CLI installations (poetry, codecov)
- python -m pip install pipx
# Manually set the path because "pipx ensurepath" needs a reload to apply
- cmd: set PATH=%USERPROFILE%\.local\bin;%PATH%
- sh: export PATH=$HOME/.local/bin:$PATH
# Check the PATH
- cmd: echo %PATH%
- sh: echo $PATH
# Install poetry and configure
- python -m pipx install poetry
- poetry config virtualenvs.in-project true
- poetry config --list
# Install project-specific dependencies and extras
- poetry install
test_script:
- echo "Testing..."
- poetry run doit --continue
# On Windows only, install codecov and upload the coverage results
- cmd: poetry run doit run nox_coverage
- cmd: python -m pipx install codecov
- cmd: codecov --file coverage.json
# Pack up the release into a single zip file
- poetry run doit run zip_release
deploy_script:
- echo "Deploying..."
on_success:
- echo "On Success..."
on_failure:
- echo "On Error..."
on_finish:
- echo "Build Finish"
artifacts:
- path: releases/site.zip
- path: releases/tests.zip