-
Notifications
You must be signed in to change notification settings - Fork 27
91 lines (77 loc) · 2.38 KB
/
main.yml
File metadata and controls
91 lines (77 loc) · 2.38 KB
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
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
python_version: 3.13.x
tests:
name: ${{ matrix.os }} - Python - ${{ matrix.type }} - tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest ]
type: [ sources ]
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.13.x
architecture: x64
- uses: actions/setup-node@v6
with:
node-version: 22
- 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: Build report templates
run: |
npm install
npm run build
- 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@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.13.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 }}