refactor: rename test -> tests

This commit is contained in:
Hayden 2021-01-16 17:14:35 -09:00
commit f3890a1668
28 changed files with 36 additions and 29 deletions

View file

@ -14,36 +14,43 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 #----------------------------------------------
- name: Set up Python 3.8 # check-out repo and set-up python
uses: actions/setup-python@v1 #----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v2
with: with:
python-version: 3.8 python-version: 3.9
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry - name: Install Poetry
uses: dschep/install-poetry-action@v1.2 uses: snok/install-poetry@v1.1.1
- name: Install Poetry
uses: dschep/install-poetry-action@v1.2
- name: Cache Poetry virtualenv
uses: actions/cache@v1
id: cache
with: with:
path: ~/.virtualenvs virtualenvs-create: true
key: poetry-${{ hashFiles('**/poetry.lock') }} virtualenvs-in-project: true
restore-keys: | #----------------------------------------------
poetry-${{ hashFiles('**/poetry.lock') }} # load cached venv if cache exists
#----------------------------------------------
- name: Set Poetry config - name: Load cached venv
run: | id: cached-poetry-dependencies
poetry config settings.virtualenvs.in-project false uses: actions/cache@v2
poetry config settings.virtualenvs.path ~/.virtualenvs with:
path: .venv
- name: Install Dependencies key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
run: poetry install run: poetry install
if: steps.cache.outputs.cache-hit != 'true' if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
#----------------------------------------------
- name: Code Quality # run test suite
run: poetry run black . --check #----------------------------------------------
- name: Run tests
- name: Test with pytest run: |
run: poetry run pytest --cov . -n 2 source .venv/bin/activate
pytest mealie/tests/
coverage report

View file

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before After
Before After