[pre-commit.ci] pre-commit autoupdate #499
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Application Code | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "**.py" | |
- "**.sh" | |
- "**.yml" | |
- "**.toml" | |
- "**.lock" | |
- "**.sql" | |
- "Dockerfile" | |
pull_request: | |
env: | |
APP_HOST: "0.0.0.0" | |
APP_PORT: "10000" | |
AUTOMATICALLY_REPORT_PROBLEMS: "False" | |
LOG_WITH_COLORS: "False" | |
COMMAND_PREFIX: "!" | |
DATA_DIRECTORY: "not relevant" | |
DB_HOST: "mysql" | |
DB_NAME: "bancho" | |
DB_PASS: "lol123" | |
DB_PORT: "3306" | |
DB_USER: "cmyui" | |
DEBUG: "True" | |
DEVELOPER_MODE: "True" | |
DISALLOWED_NAMES: "mrekk,vaxei,btmc,cookiezi" | |
DISALLOWED_PASSWORDS: "password,abc123" | |
DISALLOW_OLD_CLIENTS: "False" | |
DOMAIN: "cmyui.xyz" | |
MENU_ICON_URL: "https://akatsuki.pw/static/logos/logo_ingame.png" | |
MENU_ONCLICK_URL: "https://akatsuki.pw" | |
MIRROR_DOWNLOAD_ENDPOINT: "https://catboy.best/d" | |
MIRROR_SEARCH_ENDPOINT: "https://catboy.best/api/search" | |
PP_CACHED_ACCS: "90,95,98,99,100" | |
REDIRECT_OSU_URLS: "True" | |
REDIS_DB: "0" | |
REDIS_HOST: "redis" | |
REDIS_PASS: "pass" | |
REDIS_PORT: "6379" | |
REDIS_USER: "default" | |
SEASONAL_BGS: "https://akatsuki.pw/static/flower.png,https://i.cmyui.xyz/nrMT4V2RR3PR.jpeg" | |
SSL_CERT_PATH: "not relevant" | |
SSL_KEY_PATH: "not relevant" | |
jobs: | |
run-test-suite: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Build application image | |
run: docker build -t bancho:latest . | |
- name: Start containers | |
run: docker compose -f docker-compose.test.yml up --detach --wait --wait-timeout 30 bancho-test mysql-test redis-test | |
- name: Run tests | |
run: docker compose -f docker-compose.test.yml exec -T bancho-test /srv/root/scripts/run-tests.sh | |
- name: Stop containers | |
if: always() | |
run: docker compose down | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: code-coverage-report | |
path: coverage/ |