Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public release preparations #1

Merged
merged 11 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @vint21h @Artesius
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!--- Provide a general summary of the issue in the Title above -->

## Expected Behavior
<!--- Tell what should happen -->

## Current Behavior
<!--- Tell what happens instead of the expected behavior -->

## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->

## Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.

## Context (Environment)
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps come up with a solution that is most useful in the real world -->

<!--- Provide a general summary of the issue in the Title above -->

## Detailed Description
<!--- Provide a detailed description of the change or addition you are proposing -->

## Possible Implementation
<!--- Not obligatory, but suggest an idea for implementing addition or change -->
18 changes: 18 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->

## Related Issue
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
14 changes: 14 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Security Policy

## Supported Versions

So, because this is not a thing that can produce security problems in the project using it,
security policy is very simple: supported only the last major or minor branch.

| Version | Supported |
|-----------| ------------------ |
| 0.1.x | :white_check_mark: |

## Reporting a Vulnerability

If you found something that in your opinion may produce any security problem, please create a [new issue](https://github.com/Anadea/pre-commit-config-shellcheck/issues/new/).
1 change: 1 addition & 0 deletions .github/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: true
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
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"
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "build"
on:
push:
branches:
- "*"
tags:
- "*"
pull_request:
branches:
- "*"
workflow_dispatch:
workflow_call:
env:
NAME: "pre-commit-config-shellcheck"
DEFAULT_PYTHON_VERSION: "3.10"
jobs:
check-requirements:
uses: "./.github/workflows/check-requirements.yml"
check:
name: "${{ matrix.toxenv }}"
uses: "./.github/workflows/check.yml"
test:
name: "${{ matrix.python-version }}"
uses: "./.github/workflows/test.yml"
if: success()
needs: ["check"]
coveralls:
uses: "./.github/workflows/coveralls.yml"
if: success()
needs: ["test", "check"]
36 changes: 36 additions & 0 deletions .github/workflows/check-requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "check-requirements"
on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
workflow_call:
env:
DEFAULT_PYTHON_VERSION: "3.10"
jobs:
check-requirements:
name: "check-requirements"
runs-on: "ubuntu-latest"
steps:
- name: "Git clone"
id: "git-clone"
uses: "actions/checkout@v3.0.2"
- name: "Set up Python ${{ env.DEFAULT_PYTHON_VERSION }}"
id: "set-up-python"
uses: "actions/setup-python@v4.1.0"
with:
python-version: "${{ env.DEFAULT_PYTHON_VERSION }}"
- name: "Pip cache"
id: "pip-cache"
uses: "actions/cache@v3.0.5"
with:
path: "~/.cache/pip"
key: "${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}"
restore-keys: |
"${{ 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"
47 changes: 47 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "check"
on:
workflow_dispatch:
workflow_call:
env:
NAME: "pre-commit-config-shellcheck"
DEFAULT_PYTHON_VERSION: "3.10"
jobs:
check:
name: "${{ matrix.toxenv }}"
runs-on: "ubuntu-latest"
strategy:
matrix:
toxenv: ["check", "check-build"]
steps:
- name: "Git clone"
id: "git-clone"
uses: "actions/checkout@v3.0.2"
- name: "Set up Python ${{ env.DEFAULT_PYTHON_VERSION }}"
id: "set-up-python"
uses: "actions/setup-python@v4.1.0"
with:
python-version: "${{ env.DEFAULT_PYTHON_VERSION }}"
- name: "Pip cache"
id: "pip-cache"
uses: "actions/cache@v3.0.5"
with:
path: "~/.cache/pip"
key: "${{ runner.os }}-pip-${{ matrix.toxenv }}-${{ hashFiles('setup.cfg') }}"
restore-keys: |
"${{ runner.os }}-pip-${{ matrix.toxenv }}-"
"${{ runner.os }}-pip-"
- name: "Pre-commit cache"
id: "pre-commit-cache"
uses: "actions/cache@v3.0.5"
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 }}"
42 changes: 42 additions & 0 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "coveralls"
on:
workflow_dispatch:
workflow_call:
env:
NAME: "pre-commit-config-shellcheck"
DEFAULT_PYTHON_VERSION: "3.10"
jobs:
coveralls:
name: "coveralls"
runs-on: "ubuntu-latest"
steps:
- name: "Git clone"
id: "git-clone"
uses: "actions/checkout@v3.0.2"
- name: "Set up Python ${{ env.DEFAULT_PYTHON_VERSION }}"
id: "set-up-python"
uses: "actions/setup-python@v4.1.0"
with:
python-version: "${{ env.DEFAULT_PYTHON_VERSION }}"
- name: "Pip cache"
id: "pip-cache"
uses: "actions/cache@v3.0.5"
with:
path: "~/.cache/pip"
key: "${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}"
restore-keys: |
"${{ runner.os }}-pip-"
- name: "Temporarily save coverage statistics"
id: "temporarily-save-coverage-statistics"
uses: "actions/cache@v3.0.5"
with:
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:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: "coveralls --service=github"
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "test"
on:
workflow_dispatch:
workflow_call:
env:
NAME: "pre-commit-config-shellcheck"
jobs:
test:
name: "${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- name: "Git clone"
id: "git-clone"
uses: "actions/checkout@v3.0.2"
- name: "Set up Python ${{ matrix.python-version }}"
id: "set-up-python"
uses: "actions/setup-python@v4.1.0"
with:
python-version: "${{ matrix.python-version }}"
- name: "Pip cache"
id: "pip-cache"
uses: "actions/cache@v3.0.5"
with:
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"
id: "temporarily-save-coverage-statistics"
uses: "actions/cache@v3.0.5"
with:
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"
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ repos:
stages: [commit]
language: system
pass_filenames: false
entry: bash -c 'make build -B && check-wheel-contents dist'
entry: bash -c 'make build -B && check-wheel-contents dist -c setup.cfg'
types: [python]
- id: "dotenv-linter"
name: "dotenv-linter"
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Contributors ordered by first contribution.

Eugene Pasko <pasko.eugene@gmail.com>
Alexei Andrushievich <vint21h@vint21h.pp.ua>
30 changes: 2 additions & 28 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
.ONESHELL:
PHONY: install tox test bumpversion build sign check check-build check-upload upload clean coveralls release help
PHONY: install tox test bumpversion build check check-build check-upload upload coveralls release help
NAME ?= pre-commit-config-shellcheck
TEST_PYPI_URL ?= https://test.pypi.org/legacy/
TRASH_DIRS ?= build dist *.egg-info .tox .mypy_cache .pytest_cache __pycache__ htmlcov
TRASH_FILES ?= .coverage
BUILD_TYPES ?= bdist_wheel sdist
VERSION ?= `python -c "import configparser; config = configparser.ConfigParser(); config.read('setup.cfg'); print(config['metadata']['version']);"`

Expand All @@ -27,12 +25,6 @@ build:
python setup.py $(BUILD_TYPES);\


sign:
for package in `ls dist`; do\
gpg -a --detach-sign dist/$${package};\
done;\


check:
bash -c 'NAME="$(NAME)" pre-commit run --all-files';\

Expand All @@ -49,33 +41,19 @@ upload:
twine upload --skip-existing -s dist/*;\


clean:
for file in $(TRASH_FILES); do\
find -iname $${file} -print0 | xargs -0 rm -rf;\
done;\
for dir in $(TRASH_DIRS); do\
find -type d -name $${dir} ! -path "*/.direnv/*" -print0 | xargs -0 rm -rf;\
done;\


coveralls:
coveralls;\


release:
make clean && \
make bumpversion && \
git co master && \
git merge dev && \
git co dev && \
git push --all && \
git push --tags && \
make build && \
make sign && \
make check-build && \
make check-upload && \
make upload && \
make clean;\
make upload;\


help:
Expand All @@ -91,8 +69,6 @@ help:
@echo " Tag current code revision with version."
@echo " build:"
@echo " Build python packages, can specify packages types with 'BUILD_TYPES' variable."
@echo " sign:"
@echo " Sign python packages."
@echo " check:"
@echo " Perform some code checks."
@echo " check-build:"
Expand All @@ -101,8 +77,6 @@ help:
@echo " Upload package to test PyPi using twine."
@echo " upload:"
@echo " Upload package to PyPi using twine."
@echo " clean:"
@echo " Recursively delete useless autogenerated files and directories, directories and files lists can be overriden through 'TRASH_DIRS' and 'TRASH_FILES' variables."
@echo " coveralls:"
@echo " Upload coverage report to Coveralls."
@echo " release:"
Expand Down
Loading