Skip to content

[Version] v0.0.18

[Version] v0.0.18 #172

Workflow file for this run

name: OctoBot-Script - CI
on:
push:
branches:
- 'master'
tags:
- '*'
pull_request:
jobs:
lint:
uses: Drakkar-Software/.github/.github/workflows/python3_lint_workflow.yml@master
with:
project_main_package: octobot_script
tests:
name: ${{ matrix.os }} - Python - ${{ matrix.type }} - tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-13, windows-latest, ubuntu-latest ]
type: [ sources ]
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.10.x
architecture: x64
- name: Install dependencies
run: pip install --prefer-binary -r dev_requirements.txt -r requirements.txt
- name: Install tentacles from cli
run: python start.py install_tentacles
- name: Pytests
run: pytest --cov=. --cov-config=.coveragerc --durations=0 -rw tests
- name: Publish coverage
if: matrix.type == 'sources' && github.event_name == 'push'
run: coveralls
continue-on-error: true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
publish:
needs:
- lint
- tests
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
name: Source distribution - Python - deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.10.x
architecture: x64
- name: Install dependencies
run: pip install --prefer-binary -r dev_requirements.txt -r requirements.txt
- name: Build sdist
run: python setup.py sdist
- name: Publish package
run: |
python -m twine upload --repository-url ${{ secrets.PYPI_OFFICIAL_UPLOAD_URL }} -u __token__ -p ${{ secrets.PYPI_TOKEN }} --skip-existing dist/*
notify:
if: ${{ failure() }}
needs:
- lint
- tests
- publish
uses: Drakkar-Software/.github/.github/workflows/failure_notify_workflow.yml@master
secrets:
DISCORD_GITHUB_WEBHOOK: ${{ secrets.DISCORD_GITHUB_WEBHOOK }}