-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
61 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,34 @@ | ||
--- | ||
name: Testing bemore | ||
|
||
on: push | ||
|
||
jobs: | ||
black: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.9" | ||
- name: Install deps | ||
uses: knowsuchagency/poetry-install@v1 | ||
env: | ||
POETRY_VIRTUALENVS_CREATE: false | ||
- name: Run black check | ||
run: poetry run black --check . | ||
flake8: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.9" | ||
- name: Install deps | ||
uses: knowsuchagency/poetry-install@v1 | ||
env: | ||
POETRY_VIRTUALENVS_CREATE: false | ||
- name: Run flake8 check | ||
run: poetry run flake8 --count . | ||
|
||
pytest: | ||
runs-on: ubuntu-latest | ||
services: | ||
bemore-db: | ||
image: bitnami/mysql:8.0.30 | ||
env: | ||
MYSQL_ROOT_PASSWORD: "bemore" | ||
MYSQL_ROOT_USER: "bemore" | ||
MYSQL_DATABASE: "bemore" | ||
MYSQL_AUTHENTICATION_PLUGIN: "mysql_native_password" | ||
options: >- | ||
--health-cmd="mysqladmin ping -u root" | ||
--health-interval=15s | ||
--health-timeout=5s | ||
--health-retries=6 | ||
ports: | ||
- 3306:3306 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.9" | ||
- name: Install deps | ||
uses: knowsuchagency/poetry-install@v1 | ||
env: | ||
POETRY_VIRTUALENVS_CREATE: false | ||
- name: Run pytest check | ||
run: poetry run pytest -vv --cov="bemore" . | ||
env: | ||
BEMORE_HOST: "0.0.0.0" | ||
BEMORE_DB_HOST: localhost | ||
black: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
- name: Install deps | ||
uses: knowsuchagency/poetry-install@v1 | ||
env: | ||
POETRY_VIRTUALENVS_CREATE: false | ||
- name: Run black check | ||
run: poetry run black --check . | ||
flake8: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
- name: Install deps | ||
uses: knowsuchagency/poetry-install@v1 | ||
env: | ||
POETRY_VIRTUALENVS_CREATE: false | ||
- name: Run flake8 check | ||
run: poetry run flake8 --count . |