mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 06:23:34 -07:00
refactor: rename test -> tests
This commit is contained in:
parent
b0faddea52
commit
f3890a1668
28 changed files with 36 additions and 29 deletions
65
.github/workflows/pytest.yml
vendored
65
.github/workflows/pytest.yml
vendored
|
@ -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
|
||||||
|
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Loading…
Add table
Add a link
Reference in a new issue