Add Render demo #139
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: Tests | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
concurrency: | |
group: ${{github.workflow}}-${{github.head_ref}} | |
cancel-in-progress: true | |
jobs: | |
sqlite: | |
name: "SQLite & Python 3.8" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout repository" | |
uses: actions/checkout@v4 | |
- name: "Set up Python 3.8" | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
- name: "Install dependencies" | |
run: pip install -e .[dev,csp,redis,memc] | |
- name: "Set up .env file" | |
run: cp .env.example .env | |
- name: "Lint project" | |
run: scripts/lint.sh | |
- name: "Run tests" | |
run: py.test --cov-report=xml | |
env: | |
DB_TYPE: sqlite3 | |
- name: "Set up coveralls" | |
run: |- | |
pip install coveralls | |
coveralls --service=github | |
continue-on-error: true | |
env: | |
COVERALLS_PARALLEL: true | |
COVERALLS_FLAG_NAME: SQLite | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: "Send status to Discord" | |
uses: MangAdventure/discord-webhook@v0.4 | |
if: github.event_name == 'push' && !cancelled() | |
continue-on-error: true | |
with: | |
run-suffix: ".1" | |
lang-name: Python | |
lang-version: "3.8" | |
webhook-url: ${{secrets.BUILD_WEBHOOK}} | |
mysql: | |
name: "MySQL & Python 3.9" | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mariadb:10.5 | |
ports: ["3306:3306"] | |
env: | |
MYSQL_DATABASE: mangadv | |
MYSQL_ROOT_PASSWORD: ${{secrets.DB_PASSWORD}} | |
options: >- | |
--health-cmd="mysqladmin ping" | |
--health-interval=10s | |
--health-timeout=5s | |
--health-retries=3 | |
steps: | |
- name: "Checkout repository" | |
uses: actions/checkout@v4 | |
- name: "Set up Python 3.9" | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- name: "Install dependencies" | |
run: pip install -e .[dev,mysql] | |
- name: "Set up .env file" | |
run: cp .env.example .env | |
- name: "Lint project" | |
run: scripts/lint.sh | |
- name: "Run tests" | |
run: py.test --cov-report=xml | |
env: | |
DB_TYPE: mysql | |
DB_PASSWORD: ${{secrets.DB_PASSWORD}} | |
- name: "Set up coveralls" | |
run: |- | |
pip install coveralls | |
coveralls --service=github | |
continue-on-error: true | |
env: | |
COVERALLS_PARALLEL: true | |
COVERALLS_FLAG_NAME: MySQL | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: "Send status to Discord" | |
uses: MangAdventure/discord-webhook@v0.4 | |
if: github.event_name == 'push' && !cancelled() | |
continue-on-error: true | |
with: | |
run-suffix: ".2" | |
lang-name: Python | |
lang-version: "3.9" | |
webhook-url: ${{secrets.BUILD_WEBHOOK}} | |
postgresql: | |
name: "PostgreSQL & Python 3.10" | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:13 | |
ports: ["5432:5432"] | |
env: | |
POSTGRES_DB: mangadv | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: ${{secrets.DB_PASSWORD}} | |
options: >- | |
--health-cmd="pg_isready" | |
--health-interval=10s | |
--health-timeout=5s | |
--health-retries=3 | |
steps: | |
- name: "Checkout repository" | |
uses: actions/checkout@v4 | |
- name: "Set up Python 3.10" | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: "Install dependencies" | |
run: pip install -e .[dev,pgsql] | |
- name: "Set up .env file" | |
run: cp .env.example .env | |
- name: "Lint project" | |
run: scripts/lint.sh | |
- name: "Run tests" | |
run: py.test --cov-report=xml | |
env: | |
DB_TYPE: postgresql | |
DB_PASSWORD: ${{secrets.DB_PASSWORD}} | |
- name: "Set up coveralls" | |
run: |- | |
pip install coveralls | |
coveralls --service=github | |
continue-on-error: true | |
env: | |
COVERALLS_PARALLEL: true | |
COVERALLS_FLAG_NAME: PostgreSQL | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: "Send status to Discord" | |
uses: MangAdventure/discord-webhook@v0.4 | |
if: github.event_name == 'push' && !cancelled() | |
continue-on-error: true | |
with: | |
run-suffix: ".3" | |
lang-name: Python | |
lang-version: "3.10" | |
webhook-url: ${{secrets.BUILD_WEBHOOK}} | |
coveralls: | |
name: "Coveralls" | |
needs: [sqlite, mysql, postgresql] | |
runs-on: ubuntu-latest | |
container: python:3-slim | |
steps: | |
- name: "Install coveralls package" | |
run: pip install coveralls | |
- name: "Upload coverage to coveralls" | |
run: coveralls --service=github --finish | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |