-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
bb19b82
commit c6cc1f8
Showing
21 changed files
with
1,073 additions
and
592 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[run] | ||
branch = True | ||
source = | ||
drf_react_template | ||
omit = | ||
*example* | ||
*tests* | ||
|
||
[report] | ||
show_missing = True |
30 changes: 30 additions & 0 deletions
30
.github/actions/drf-react-template-framework-build/action.yml
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: 'DRF React Template Framework Build' | ||
description: 'DRF React Template Framework build steps' | ||
inputs: | ||
python-version: | ||
description: 'Python version to use' | ||
required: true | ||
default: '3.10' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up Python ${{ inputs.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1.3 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: .venv | ||
key: venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction --no-root | ||
shell: bash |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: "Continuous Integration" | ||
on: [push] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.10.0 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
- name: Run pre-commit | ||
uses: pre-commit/action@v2.0.0 | ||
|
||
test: | ||
needs: lint | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: ["3.7", "3.8", "3.9", "3.10"] | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
- name: Build steps | ||
uses: ./.github/actions/drf-react-template-framework-build | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Test with pytest | ||
run: | | ||
poetry run pytest --cov |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
- name: Build steps | ||
uses: ./.github/actions/drf-react-template-framework-build | ||
with: | ||
python-version: "3.10" | ||
- name: Build and publish | ||
uses: d1618033/gh-action-python-publish-using-poetry@0.1.1 | ||
with: | ||
pypi_username: '__token__' | ||
pypi_password: ${{ secrets.PYPI_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[settings] | ||
; Taken from https://black.readthedocs.io/en/stable/compatible_configs.html#isort | ||
multi_line_output = 3 | ||
include_trailing_comma = True | ||
force_grid_wrap = 0 | ||
use_parentheses = True | ||
ensure_newline_before_comments = True | ||
line_length = 88 | ||
known_third_party = django,factory,pytest,rest_framework,six |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
repos: | ||
- repo: https://github.com/asottile/seed-isort-config | ||
rev: v1.9.4 | ||
hooks: | ||
- id: seed-isort-config | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.5.4 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/psf/black | ||
rev: 21.12b0 | ||
hooks: | ||
- id: black | ||
language_version: python3.10 | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.8.4 | ||
hooks: | ||
- id: flake8 | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: check-ast | ||
- id: debug-statements |
File renamed without changes.
Oops, something went wrong.