-
-
Notifications
You must be signed in to change notification settings - Fork 13
128 lines (118 loc) · 3.52 KB
/
platforms.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Platforms
on: push
jobs:
discord:
name: Discord
strategy:
fail-fast: false
max-parallel: 1
matrix:
os: [ubuntu-latest]
# Container action (for PostgreSQL) is only supported on Linux
postgresql-version: ['12.1']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/[email protected]
- name: Set up PostgreSQL ${{ matrix.postgresql-version }}
uses: harmon758/postgresql-action@v1
with:
postgresql version: ${{ matrix.postgresql-version }}
postgresql db: harmonbot
postgresql user: harmonbot
postgresql password: ""
- name: Set up Python
uses: actions/[email protected]
with:
python-version-file: pyproject.toml
architecture: x64
- name: Cache pip
uses: actions/[email protected]
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test Discord Harmonbot
env:
DISCORD_BETA_BOT_TOKEN: ${{ secrets.DISCORD_BETA_BOT_TOKEN }}
run: |
cd Discord
python Harmonbot.py
telegram:
name: Telegram
strategy:
fail-fast: false
max-parallel: 1
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/[email protected]
- name: Set up Python
uses: actions/[email protected]
with:
python-version-file: pyproject.toml
architecture: x64
- uses: actions/[email protected]
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/[email protected]
if: startsWith(runner.os, 'macOS')
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/[email protected]
if: startsWith(runner.os, 'Windows')
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test Telegram Harmonbot
env:
TELEGRAM_BOT_API_TOKEN: ${{ secrets.TELEGRAM_BOT_API_TOKEN }}
run: |
cd Telegram
python Telegram_Harmonbot.py
discord_listener:
name: Discord Listener
strategy:
fail-fast: false
max-parallel: 1
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
go-version: ['1.20.9']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Set up Go ${{ matrix.go-version }}
uses: actions/[email protected]
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Get dependencies
run: |
go get github.com/bwmarrin/discordgo
go get github.com/bwmarrin/dgvoice
go get github.com/joho/godotenv
- name: Test Discord Listener
env:
DISCORD_LISTENER_BOT_TOKEN: ${{ secrets.DISCORD_LISTENER_BOT_TOKEN }}
run: |
cd Discord
go run Harmonbot_Listener.go