add respx requirement for mocking http calls #23
Workflow file for this run
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 | |
env: | |
DB_USER: ${{ vars.DB_USER }} | |
DB_PASS: ${{ vars.DB_PASS }} | |
DB_NAME: ${{ vars.DB_NAME }} | |
DB_HOST: ${{ vars.DB_HOST }} | |
DB_PORT: ${{ vars.DB_PORT }} | |
REDIS_PASS: ${{ vars.REDIS_PASS }} | |
APP_PORT: ${{ vars.APP_PORT }} | |
APP_HOST: ${{ vars.APP_HOST }} | |
REDIS_USER: ${{ vars.REDIS_USER }} | |
REDIS_HOST: ${{ vars.REDIS_HOST }} | |
REDIS_PORT: ${{ vars.REDIS_PORT }} | |
REDIS_DB: ${{ vars.REDIS_DB }} | |
OSU_API_KEY: ${{ vars.OSU_API_KEY }} | |
MIRROR_SEARCH_ENDPOINT: ${{ vars.MIRROR_SEARCH_ENDPOINT }} | |
MIRROR_DOWNLOAD_ENDPOINT: ${{ vars.MIRROR_DOWNLOAD_ENDPOINT }} | |
DOMAIN: ${{ vars.DOMAIN }} | |
COMMAND_PREFIX: ${{ vars.COMMAND_PREFIX }} | |
SEASONAL_BGS: ${{ vars.SEASONAL_BGS }} | |
MENU_ICON_URL: ${{ vars.MENU_ICON_URL }} | |
MENU_ONCLICK_URL: ${{ vars.MENU_ONCLICK_URL }} | |
DATADOG_API_KEY: ${{ vars.DATADOG_API_KEY }} | |
DATADOG_APP_KEY: ${{ vars.DATADOG_APP_KEY }} | |
DEBUG: ${{ vars.DEBUG }} | |
REDIRECT_OSU_URLS: ${{ vars.REDIRECT_OSU_URLS }} | |
PP_CACHED_ACCS: ${{ vars.PP_CACHED_ACCS }} | |
DISALLOWED_NAMES: ${{ vars.DISALLOWED_NAMES }} | |
DISALLOWED_PASSWORDS: ${{ vars.DISALLOWED_PASSWORDS }} | |
DISALLOW_OLD_CLIENTS: ${{ vars.DISALLOW_OLD_CLIENTS }} | |
DISCORD_AUDIT_LOG_WEBHOOK: ${{ vars.DISCORD_AUDIT_LOG_WEBHOOK }} | |
AUTOMATICALLY_REPORT_PROBLEMS: ${{ vars.AUTOMATICALLY_REPORT_PROBLEMS }} | |
SSL_CERT_PATH: ${{ vars.SSL_CERT_PATH }} | |
SSL_KEY_PATH: ${{ vars.SSL_KEY_PATH }} | |
DEVELOPER_MODE: ${{ vars.DEVELOPER_MODE }} | |
jobs: | |
run-test-suite: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Build application image | |
run: docker build -t bancho:latest . | |
- name: Start containers | |
run: docker-compose up -d bancho mysql redis | |
- name: Run tests | |
run: docker-compose exec -T bancho /srv/root/scripts/run-tests.sh | |
- name: Stop containers | |
if: always() | |
run: docker-compose down |