@@ -13,19 +13,31 @@ jobs:
1313 fail-fast : false
1414 matrix :
1515 py_ver :
16- - ' 3.8'
1716 - ' 3.9'
1817 - ' 3.10'
1918 - ' 3.11'
19+ - ' 3.12'
2020 steps :
2121 - uses : actions/checkout@v3
22+ with :
23+ submodules : ' true'
2224 - uses : actions/setup-python@v4
2325 with :
24- python-version : ${{matrix.py_ver}}
26+ python-version : ${{ matrix.py_ver }}
2527 - name : Install Package
2628 run : pip install .
2729 - name : Test Package
28- run : echo -e "none\nnone" | discordai -V
30+ env :
31+ PY_VER : ${{ matrix.py_ver }}
32+ DISCORD_BOT_TOKEN : ${{ secrets.DISCORD_BOT_TOKEN }}
33+ OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
34+ CHANNEL_ID : ${{ secrets.CHANNEL_ID }}
35+ USERNAME : ${{ secrets.USERNAME }}
36+ PYTHONUNBUFFERED : 1
37+ run : |
38+ touch .env.test
39+ export VERSION=$(cat discordai/version.py | grep -oP '\d+\.\d+\.\d+')
40+ docker compose -f docker-compose-test.yaml up --build --exit-code-from tests
2941 release :
3042 if : |
3143 github.event_name == 'push' &&
@@ -41,11 +53,11 @@ jobs:
4153 - name : Create release
4254 uses : actions/create-release@v1
4355 env :
44- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
56+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4557 with :
46- tag_name : ${{steps.version.outputs.discordai_version}}
47- release_name : Release ${{steps.version.outputs.discordai_version}}
48- body : Release ${{steps.version.outputs.discordai_version}}
58+ tag_name : ${{ steps.version.outputs.discordai_version }}
59+ release_name : Release ${{ steps.version.outputs.discordai_version }}
60+ body : Release ${{ steps.version.outputs.discordai_version }}
4961 draft : false
5062 prerelease : false
5163 package :
@@ -62,25 +74,25 @@ jobs:
6274 - uses : actions/checkout@v3
6375 - uses : actions/setup-python@v4
6476 with :
65- python-version : ' 3.11 '
77+ python-version : ' 3.12 '
6678 - name : Install Dependencies
67- run : pip install . pyinstaller==5.7
79+ run : pip install . pyinstaller
6880 # Package
6981 - name : Windows CLI Package
70- if : ${{matrix.os == 'windows-latest'}}
82+ if : ${{ matrix.os == 'windows-latest' }}
7183 run : |
72- pyinstaller discordai/command_line.py --console --onefile --name=discordai --add-binary='discordai/bot/cogs;discordai/bot/cogs' --hidden-import=openai --hidden-import=tiktoken --collect-data=discordai_modelizer
84+ pyinstaller discordai/command_line/command_line .py --console --onefile --name=discordai --add-binary='discordai/bot/cogs;discordai/bot/cogs' --hidden-import=openai --collect-data=discordai_modelizer
7385 Compress-Archive -Path dist\*discordai* -DestinationPath discordai-windows.zip
7486 - name : Mac CLI Package
75- if : ${{matrix.os == 'macos-latest'}}
87+ if : ${{ matrix.os == 'macos-latest' }}
7688 run : |
77- pyinstaller discordai/command_line.py --console --onefile --name=discordai --add-data='discordai/bot/cogs:discordai/bot/cogs' --hidden-import=openai --hidden-import=tiktoken --hidden-import=configparser --collect-data=discordai_modelizer --collect-data=aiohttp --collect-data=certifi
89+ pyinstaller discordai/command_line/command_line .py --console --onefile --name=discordai --add-data='discordai/bot/cogs:discordai/bot/cogs' --hidden-import=openai --hidden-import=configparser --collect-data=discordai_modelizer --collect-data=aiohttp --collect-data=certifi
7890 zip -j discordai-macos.zip dist/*discordai*
7991 chmod +x dist/*discordai*
8092 - name : Linux CLI Package
81- if : ${{matrix.os == 'ubuntu-latest'}}
93+ if : ${{ matrix.os == 'ubuntu-latest' }}
8294 run : |
83- pyinstaller discordai/command_line.py --console --onefile --name=discordai --add-binary='discordai/bot/cogs:discordai/bot/cogs' --hidden-import=openai --hidden-import=tiktoken --collect-data=discordai_modelizer
95+ pyinstaller discordai/command_line/command_line .py --console --onefile --name=discordai --add-binary='discordai/bot/cogs:discordai/bot/cogs' --hidden-import=openai --collect-data=discordai_modelizer
8496 zip -j discordai-linux.zip dist/*discordai*
8597 chmod +x dist/*discordai*
8698 # Upload
0 commit comments