Skip to content

Commit

Permalink
Big update
Browse files Browse the repository at this point in the history
  • Loading branch information
vint21h committed Nov 17, 2021
1 parent 99e0cc3 commit df5aa97
Show file tree
Hide file tree
Showing 54 changed files with 853 additions and 1,057 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# .env.example


NAME=mcadmin
COVERALLS_REPO_TOKEN=
TWINE_USERNAME=__token__
TWINE_PASSWORD=
Expand Down
2 changes: 1 addition & 1 deletion .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ security policy is very simple: supported only the last major or minor branch.

| Version | Supported |
| ------- | ------------------ |
| 0.10.x | :white_check_mark: |
| 0.11.x | :white_check_mark: |

## Reporting a Vulnerability

Expand Down
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# django-mcadmin
# .github/dependabot.yml


version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
allow:
- dependency-name: "all"
dependency-type: "direct"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
168 changes: 93 additions & 75 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# .github/workflows/build.yml


name: build
name: "build"
on:
push:
branches:
Expand All @@ -14,103 +14,121 @@ on:
- "*"
workflow_dispatch:
env:
DEFAULT_PYTHON_VERSION: "3.9"
NAME: "mcadmin"
DEFAULT_PYTHON_VERSION: "3.10"
jobs:
check:
name: ${{ matrix.toxenv }}
runs-on: ubuntu-latest
name: "${{ matrix.toxenv }}"
runs-on: "ubuntu-latest"
strategy:
matrix:
toxenv:
- check
- check-build
toxenv: ["check", "check-build"]
steps:
- name: Git clone
uses: actions/checkout@v2
- name: Set up Python ${{ env.DEFAULT_PYTHON_VERSION }}
uses: actions/setup-python@v2
- name: "Git clone"
id: "git-clone"
uses: "actions/checkout@v2"
- name: "Set up Python ${{ env.DEFAULT_PYTHON_VERSION }}"
id: "set-up-python"
uses: "actions/setup-python@v2"
with:
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
- name: Pip cache
uses: actions/cache@v2
python-version: "${{ env.DEFAULT_PYTHON_VERSION }}"
- name: "Pip cache"
id: "pip-cache"
uses: "actions/cache@v2"
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.toxenv }}-${{ hashFiles('setup.py', 'setup.cfg', 'tox.ini') }}
path: "~/.cache/pip"
key: "${{ runner.os }}-pip-${{ matrix.toxenv }}-${{ hashFiles('setup.cfg') }}"
restore-keys: |
${{ runner.os }}-pip-${{ matrix.toxenv }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install .[test]
- name: Run ${{ matrix.toxenv }}
run: tox -e ${{ matrix.toxenv }}
"${{ runner.os }}-pip-${{ matrix.toxenv }}-"
"${{ runner.os }}-pip-"
- name: "Pre-commit cache"
id: "pre-commit-cache"
uses: "actions/cache@v2"
with:
path: "~/.cache/pre-commit"
key: "${{ runner.os }}-pre-commit-${{ matrix.toxenv }}-${{ hashFiles('.pre-commit-config.yaml') }}"
restore-keys: |
"${{ runner.os }}-pre-commit-${{ matrix.toxenv }}-"
"${{ runner.os }}-pre-commit-"
- name: "Install requirements"
id: "install-requirements"
run: "make install"
- name: "Run ${{ matrix.toxenv }}"
id: "run"
run: "tox -e ${{ matrix.toxenv }}"
test:
name: ${{ matrix.python-version }}
runs-on: ubuntu-latest
name: "${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
if: success()
needs: [check]
needs: ["check"]
strategy:
matrix:
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
steps:
- name: Git clone
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: "Git clone"
id: "git-clone"
uses: "actions/checkout@v2"
- name: "Set up Python ${{ matrix.python-version }}"
id: "set-up-python"
uses: "actions/setup-python@v2"
with:
python-version: ${{ matrix.python-version }}
- name: Pip cache
uses: actions/cache@v2
python-version: "${{ matrix.python-version }}"
- name: "Pip cache"
id: "pip-cache"
uses: "actions/cache@v2"
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py', 'setup.cfg', 'tox.ini') }}
path: "~/.cache/pip"
key: "${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.cfg') }}"
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Temporarily save coverage statistics
uses: actions/cache@v2
"${{ runner.os }}-pip-${{ matrix.python-version }}-"
"${{ runner.os }}-pip-"
- name: "Temporarily save coverage statistics"
id: "temporarily-save-coverage-statistics"
uses: "actions/cache@v2"
with:
path: .coverage
key: .coverage-${{ github.run_id }}-${{ github.run_number }}
- name: Install dependencies
run: |
pip install .[test]
- name: Run tests
path: ".coverage"
key: ".coverage-${{ github.run_id }}-${{ github.run_number }}"
- name: "Install requirements"
id: "install-requirements"
run: "make install"
- name: "Run tests"
id: "run-tests"
env:
PLATFORM: ${{ matrix.platform }}
run: make tox
PLATFORM: "${{ matrix.platform }}"
run: "make tox"
coveralls:
name: coveralls
runs-on: ubuntu-latest
name: "coveralls"
runs-on: "ubuntu-latest"
if: success()
needs: [test, check]
needs: ["test", "check"]
steps:
- name: Git clone
uses: actions/checkout@v2
- name: Set up Python ${{ env.DEFAULT_PYTHON_VERSION }}
uses: actions/setup-python@v2
- name: "Git clone"
id: "git-clone"
uses: "actions/checkout@v2"
- name: "Set up Python ${{ env.DEFAULT_PYTHON_VERSION }}"
id: "set-up-python"
uses: "actions/setup-python@v2"
with:
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
- name: Pip cache
uses: actions/cache@v2
python-version: "${{ env.DEFAULT_PYTHON_VERSION }}"
- name: "Pip cache"
id: "pip-cache"
uses: "actions/cache@v2"
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py', 'setup.cfg', 'tox.ini') }}
path: "~/.cache/pip"
key: "${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}"
restore-keys: |
${{ runner.os }}-pip-
- name: Temporarily save coverage statistics
uses: actions/cache@v2
"${{ runner.os }}-pip-"
- name: "Temporarily save coverage statistics"
id: "temporarily-save-coverage-statistics"
uses: "actions/cache@v2"
with:
path: .coverage
key: .coverage-${{ github.run_id }}-${{ github.run_number }}
- name: Install dependencies
run: |
pip install .[test]
- name: Upload coverage report to Coveralls
path: ".coverage"
key: ".coverage-${{ github.run_id }}-${{ github.run_number }}"
- name: "Install requirements"
id: "install-requirements"
run: "make install"
- name: "Upload coverage report to Coveralls"
id: "upload-coverage-report-to-coveralls"
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: make coveralls
COVERALLS_REPO_TOKEN: "${{ secrets.COVERALLS_REPO_TOKEN }}"
run: "make coveralls"
42 changes: 23 additions & 19 deletions .github/workflows/check-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# .github/workflows/check-requirements.yml


name: check-requirements
name: "check-requirements"
on:
push:
branches:
Expand All @@ -16,28 +16,32 @@ on:
- cron: "0 3 * * *"
workflow_dispatch:
env:
DEFAULT_PYTHON_VERSION: "3.9"
DEFAULT_PYTHON_VERSION: "3.10"
jobs:
check-requirements:
name: check-requirements
runs-on: ubuntu-latest
name: "check-requirements"
runs-on: "ubuntu-latest"
steps:
- name: Git clone
uses: actions/checkout@v2
- name: Set up Python ${{ env.DEFAULT_PYTHON_VERSION }}
uses: actions/setup-python@v2
- name: "Git clone"
id: "git-clone"
uses: "actions/checkout@v2"
- name: "Set up Python ${{ env.DEFAULT_PYTHON_VERSION }}"
id: "set-up-python"
uses: "actions/setup-python@v2"
with:
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
- name: Pip cache
uses: actions/cache@v2
python-version: "${{ env.DEFAULT_PYTHON_VERSION }}"
- name: "Pip cache"
id: "pip-cache"
uses: "actions/cache@v2"
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py', 'setup.cfg', 'tox.ini') }}
path: "~/.cache/pip"
key: "${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}"
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install .[test]
- name: Check outdated requirements
"${{ runner.os }}-pip-"
- name: "Install requirements"
id: "install-requirements"
run: "make install"
- name: "Check outdated requirements"
id: "check-outdated-requirements"
continue-on-error: true
run: pip-outdated
run: "pip-outdated"

0 comments on commit df5aa97

Please sign in to comment.