variables: PYTHON3_32: "C:\\python38-32\\python.exe" PYTHON3_64: "C:\\python38-64\\python.exe" NSIS: "C:\\nsis\\makensis.exe" default: image: python:3.8.4-windowsservercore ### Stage list # Build: This will be the main stage generating stuff in the dist folder. Jobs present in this stage will run py2exe or pyinstaller files accordingly. # pack: Jobs in this stage will take the dist folder and zip it or generate an exe file. stages: - test - build - pack .configure_environment: &configure_environment tags: - windows10 before_script: - '$ProgressPreference = "SilentlyContinue"' - 'Invoke-WebRequest -UseBasicParsing -Uri "https://github.com/git-for-windows/git/releases/download/v2.27.0.windows.1/Git-2.27.0-32-bit.exe" -OutFile "git_setup.exe"' - '.\git_setup.exe /verysilent /dir=C:\git' - '$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";C:\git\cmd\;" + [System.Environment]::GetEnvironmentVariable("Path","User") ' - '$env:PATH' - 'python -V' # - '&$env:PYTHON3_32 -m venv env' # - 'env\scripts\activate' - 'python -m pip install --upgrade pip' - 'python -m pip install --upgrade -r requirements.txt' test: <<: *configure_environment stage: test tags: - windows10 script: - cd src - 'python -m coverage run run_tests.py' - 'python -m coverage report --omit="test*"' coverage: '/TOTAL.+ ([0-9]{1,3}%)/' only: - master public: <<: *configure_environment stage: build script: - cd src - 'python write_version_data.py' - 'python setup.py build' - '&$env:NSIS installer.nsi' - cd .. - move src\music_dl* . - cd scripts - 'python prepare_zipversion.py' - cd .. - move src\music_dl.zip music_dl.zip - 'python scripts/generate_update_file.py' - 'python scripts/upload.py' only: - master