---
# This is the pipeline 1
kind: pipeline
type: docker
name: run_tests
# Only trigger on these event
trigger:
event:
- tag
# Pipeline steps
steps:
# Testing
- name: Testing
image: python:3.11
commands:
- pip install -r requirements.txt
- python3 run_tests.py
- python3 -c "print('The current triggered tag is ${DRONE_TAG}'); print('Start Builder WebPicDownloader for linux.')" # I know it's bad, just a test
- pyinstaller --noconfirm --onefile --windowed --icon "./webpicdownloader/assets/logo.ico" --name "WebPicDownloader" --clean --version-file "./app_version_file.txt" --add-data "./webpicdownloader/assets:webpicdownloader/assets/" --exclude-module "auto_py_to_exe" --exclude-module "pyinstaller" --exclude-module "unittest" "./main.py"
# Notifying
# - name: deploy_&_notify
# image: appleboy/drone-discord
# settings:
# webhook_id:
# from_secret: discord_id
# webhook_token:
# from_secret: discord_token
# message: "Release with tag works ! (TAG uuid: {{build.tag}})"
# when:
# status:
# - success