Skip to content

Commit d845017

Browse files
committed
load
1 parent 9a44681 commit d845017

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2036
-0
lines changed

.env_example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
PROJECT_NAME="<>"
2+
PROJECT_VERSION="0.0.1"
3+
PROJECT_DESCRIPTION="<>"
4+
MONGO_URL="<>"
5+
DEFAULT_DATABASE="<>"
6+

.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
ignore = E501,E121
3+
per-file-ignores = __init__.py:F401

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "pip" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.github/workflows/1_test.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Test Only
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
pull_request:
8+
branches:
9+
- 'main'
10+
11+
jobs:
12+
test-and-quality:
13+
uses: ./.github/workflows/commom-test-and-quality.yml

.github/workflows/2_deploy.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
name: Test and Deploy
4+
on:
5+
push:
6+
branches:
7+
- 'main_disabled'
8+
9+
permissions:
10+
contents: read
11+
12+
env:
13+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Set up Python 3.9.7
21+
uses: actions/setup-python@v3
22+
with:
23+
python-version: "3.9.7"
24+
- name: Install dependencies
25+
run: |
26+
cp .env_example .env
27+
python -m pip install --upgrade pip
28+
pip install flake8 pytest
29+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
30+
if [ -f requirements_test.txt ]; then pip install -r requirements_test.txt; fi
31+
- name: Lint with flake8
32+
run: |
33+
# stop the build if there are Python syntax errors or undefined names
34+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
35+
# exit-zero treats all errors as warnings.
36+
flake8 . --count --exit-zero --max-complexity=10 --statistics
37+
- name: Test with pytest
38+
run: |
39+
pytest -vv
40+
- uses: actions/checkout@v2
41+
- uses: superfly/flyctl-actions/setup-flyctl@master
42+
- name: Fly.io deploy
43+
run: flyctl deploy --remote-only
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: application test and quality
5+
6+
on:
7+
workflow_call
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up Python 3.9.7
20+
uses: actions/setup-python@v3
21+
with:
22+
python-version: "3.9.7"
23+
- name: Install dependencies
24+
run: |
25+
cp .env_example .env
26+
python -m pip install --upgrade pip
27+
pip install flake8 pytest
28+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
29+
- name: Lint with flake8
30+
run: |
31+
# stop the build if there are Python syntax errors or undefined names
32+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
33+
# exit-zero treats all errors as warnings.
34+
flake8 . --count --exit-zero --max-complexity=10 --statistics
35+
- name: Test with pytest
36+
run: |
37+
pytest -vv

0 commit comments

Comments
 (0)