Skip to content

Support slash command for lotto #929

Support slash command for lotto

Support slash command for lotto #929

Workflow file for this run

name: Build and Test
on:
push:
branches:
- main
- release-*
pull_request:
branches:
- main
- release-*
# on: [push, pull_request]
env:
DEFAULT_PYTHON: "3.10"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
name: build and test
runs-on: windows-2022
timeout-minutes: 60
defaults:
run:
shell: pwsh
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: "poetry"
- name: Check lock file
run: poetry check --lock
- name: Install dependencies
run: |
pipx runpip poetry show virtualenv
poetry run python -m pip install -U pip
poetry install --no-root
- name: Unit Test
run: |
poetry run pytest
- name: Version
env:
API_KEY: ${{ secrets.API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
poetry run python package/vc.py -gb ; if ($LASTEXITCODE) { exit $LASTEXITCODE }
echo "mkbot_version=$(cat version.txt)" >> $env:GITHUB_ENV
if ($Env:API_KEY) { echo $Env:API_KEY > src\lib\mgylabs\constants\APIKey.py }
- name: Build MK Bot
run: |
poetry run scripts\build.bat --canary
- name: Test with dry run
run: |
mkdir $Env:USERPROFILE\.mkbot-canary > $null
mkdir "$Env:LOCALAPPDATA\Mulgyeol\Mulgyeol MK Bot Canary" > $null
cp -Path package\data -Destination "$Env:LOCALAPPDATA\Mulgyeol\Mulgyeol MK Bot Canary" -Recurse
cp -Path extensions -Destination $Env:USERPROFILE\.mkbot-canary -Recurse
cd .\build\bin
.\MKBotCore.exe --dry-run
- name: Packaging
run: |
& "${Env:programfiles(x86)}\Inno Setup 6\iscc.exe" "/DNameLong=Mulgyeol MK Bot Canary" "/DNameShort=MK Bot Canary" "/DVersion=${Env:mkbot_version}" "/DAppExeName=MKBot-Canary.exe" "/DAppMutex=MKBotCanary" "/DExtDirName=.mkbot-canary" "/DDName=mkbot-can" "package\MKBot.iss"