From 0a7753eee5e4d75acb4f17ae770af815a9b0af72 Mon Sep 17 00:00:00 2001 From: mraniki <8766259+mraniki@users.noreply.github.com> Date: Thu, 24 Aug 2023 21:54:29 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/bug_report.md | 38 ----- .github/dependabot.yml | 36 ++--- .github/renovate.json | 3 +- .../\342\230\201\357\270\217Deploy.yml" | 76 ---------- .../archive/\342\233\231Automerge.yml" | 21 --- .../archive/\360\237\220\215Build.yml" | 141 ------------------ .../archive/\360\237\220\263Docker.yml" | 60 -------- .../\360\237\224\217Security.yml.archive" | 63 -------- .../\360\237\246\216build_dev.yml.archive" | 49 ------ .../archive/\360\237\247\252test.yml.archive" | 64 -------- .../\360\237\247\271cleanup.yml.archive" | 29 ---- 11 files changed, 21 insertions(+), 559 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 ".github/workflows/archive/\342\230\201\357\270\217Deploy.yml" delete mode 100644 ".github/workflows/archive/\342\233\231Automerge.yml" delete mode 100644 ".github/workflows/archive/\360\237\220\215Build.yml" delete mode 100644 ".github/workflows/archive/\360\237\220\263Docker.yml" delete mode 100644 ".github/workflows/archive/\360\237\224\217Security.yml.archive" delete mode 100644 ".github/workflows/archive/\360\237\246\216build_dev.yml.archive" delete mode 100644 ".github/workflows/archive/\360\237\247\252test.yml.archive" delete mode 100644 ".github/workflows/archive/\360\237\247\271cleanup.yml.archive" diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index dd84ea78..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0fe1da3d..28bc04b2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,27 +1,29 @@ version: 2 updates: - - # Maintain dependencies for GitHub Actions - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" - commit-message: - prefix: "⬆️ Dep" - + # Maintain dependencies for poetry - package-ecosystem: "pip" directory: "/" + target-branch: "dev" schedule: interval: "daily" commit-message: - prefix: "⬆️ Dep" + prefix: "⬆️ 🤖 Dependencies" + + + # Maintain dependencies for GitHub Actions + # - package-ecosystem: "github-actions" + # directory: "/" + # #target-branch: "dev" + # schedule: + # interval: "weekly" + # commit-message: + # prefix: "⬆️ Dep" # Maintain dependencies for pip - - package-ecosystem: "pip" - directory: "/.requirements/" - schedule: - interval: "weekly" - commit-message: - prefix: "⬆️ Dep" - \ No newline at end of file + #- package-ecosystem: "pip" + # directory: "/.requirements/" + # schedule: + # interval: "weekly" + # commit-message: + # prefix: "⬆️ Dep" diff --git a/.github/renovate.json b/.github/renovate.json index 304993b8..e84b0171 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -2,7 +2,7 @@ "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ "config:base", - ":semanticCommitTypeAll(⬆️)", + ":semanticCommitTypeAll(⬆️ 🛠️)", ":disableDependencyDashboard" ], "semanticCommits": "enabled", @@ -16,6 +16,7 @@ "matchUpdateTypes": ["minor", "patch"], "matchCurrentVersion": "!/^0/", "automerge": true, + "matchBaseBranches": ["dev"], "minimumReleaseAge": "15 days" }, { diff --git "a/.github/workflows/archive/\342\230\201\357\270\217Deploy.yml" "b/.github/workflows/archive/\342\230\201\357\270\217Deploy.yml" deleted file mode 100644 index 6445360f..00000000 --- "a/.github/workflows/archive/\342\230\201\357\270\217Deploy.yml" +++ /dev/null @@ -1,76 +0,0 @@ -name: ☁️Deploy - -on: - workflow_dispatch: - workflow_run: - workflows: [🐳Docker] - types: - - completed - - -jobs: - Notify: - name: Discord - runs-on: ubuntu-latest - steps: - - name: Actions Start Discord - uses: sarisia/actions-status-discord@v1 - if: always() - with: - webhook: ${{ secrets.DISCORD_WEBHOOK }} - title: "New Docker Ready" - noprefix: true - color: 0xf5d442 - # - name: Actions Start Apprise - # uses: cstuder/apprise-ga@v3 - # with: - # title: "Notication title" - # message: "Message" - # env: - # APPRISE_URL: ${{ secrets.APPRISE_URL }} - # - name: send telegram message on push - # uses: appleboy/telegram-action@master - # with: - # to: ${{ secrets.TELEGRAM_TO }} - # token: ${{ secrets.TELEGRAM_TOKEN }} - # message: | - # ${{ github.actor }} created commit: - # Commit message: ${{ github.event.commits[0].message }} - - # Repository: ${{ github.repository }} - - # See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}} - - - # - name: get repository name - # run: echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV - # - name: update repo category by language - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # REPOSITORY: ${{ env.REPOSITORY_NAME }} - # USERNAME: ${{ github.repository_owner }} - - # Koyeb: - # - name: Build and deploy the application to Koyeb - # uses: koyeb/action-git-deploy@v1 - # with: - # app-name: my-koyeb-app - # service-name: my-koyeb-service - # service-env: "PORT=8080" - # service-ports: "8080:http" - # service-routes: "/health:8080" - - - - # Deta: - # name: Deploy - # runs-on: ubuntu-latest - # steps: - # - name: Checkout - # uses: actions/checkout@v3.5.2 - # - name: Deploy to Deta - # uses: BogDAAAMN/deta-deploy-action@v1.0.1 - # with: - # deta-access-token: ${{ secrets.DETA_ACCESS_TOKEN }} - # deta-name: ${{ secrets.DETA_STAGING_MICRO_NAME }} - # deta-project: ${{ secrets.DETA_PROJECT_NAME }} \ No newline at end of file diff --git "a/.github/workflows/archive/\342\233\231Automerge.yml" "b/.github/workflows/archive/\342\233\231Automerge.yml" deleted file mode 100644 index 2cc1da80..00000000 --- "a/.github/workflows/archive/\342\233\231Automerge.yml" +++ /dev/null @@ -1,21 +0,0 @@ -name: ⛙Automerge -on: - workflow_run: - workflows: ["🐍Build"] - branches: [ "main" ] - types: - - completed -jobs: - automerge: - runs-on: ubuntu-latest - steps: - - id: automerge - name: automerge - uses: "pascalgn/automerge-action@v0.15.6" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - MERGE_METHOD: "merge" - MERGE_FORKS: "false" - MERGE_RETRIES: "1" - MERGE_RETRY_SLEEP: "10000" - MERGE_REQUIRED_APPROVALS: "0" \ No newline at end of file diff --git "a/.github/workflows/archive/\360\237\220\215Build.yml" "b/.github/workflows/archive/\360\237\220\215Build.yml" deleted file mode 100644 index 61d9d55d..00000000 --- "a/.github/workflows/archive/\360\237\220\215Build.yml" +++ /dev/null @@ -1,141 +0,0 @@ - -name: 🐍Build - -on: - push: - branches: ["main"] - pull_request: - workflow_dispatch: - schedule: - - cron: '42 23 * * 5' - -jobs: - - coding-standards: - name: Linting & CodingStandards - runs-on: ubuntu-latest - steps: - - name: Check out repository - uses: actions/checkout@v3.5.2 - - - name: Lint Code Base - uses: github/super-linter@v5 - env: - VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: main - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - VALIDATE_MARKDOWN: false - VALIDATE_PYTHON_MYPY: false - VALIDATE_PYTHON_ISORT: false - #DISABLE_ERRORS: true - - - build: - needs: [coding-standards] - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3.5.2 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - name: Install dependencies - run: | - python -m pip install --upgrade pip twine - pip install poetry - poetry install - - name: Build package - run: poetry build - - - test: - needs: [build] - runs-on: ubuntu-latest - steps: - - name: Check out repository - uses: actions/checkout@v3.5.2 - - name: Set up python - id: setup-python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - name: Install Poetry - uses: snok/install-poetry@v1 - with: - virtualenvs-create: true - virtualenvs-in-project: true - installer-parallel: true - - name: Load cached venv - id: cached-poetry-dependencies - uses: actions/cache@v3 - with: - path: .venv - key: venv-${{ runner.os }}-${{ 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 - - name: Install project - run: poetry install --no-interaction - - name: Test with pytest - run: poetry run pytest --cov . --cov-report=xml - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - - scanning: - needs: [test] - name: Code Scanning - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3.5.2 - with: - fetch-depth: 0 # fetch all history so multiple commits can be scanned - - name: GitGuardian scan - uses: GitGuardian/ggshield-action@v1.15.0 - env: - GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }} - GITHUB_PUSH_BASE_SHA: ${{ github.event.base }} - GITHUB_PULL_BASE_SHA: ${{ github.event.pull_request.base.sha }} - GITHUB_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} - GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }} - - release: - if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }} - runs-on: ubuntu-latest - needs: [build] - steps: - - uses: actions/checkout@v3.5.2 - with: - fetch-depth: 0 - - name: Python Semantic Release - uses: relekang/python-semantic-release@v7.33.3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - repository_username: __token__ - repository_password: ${{ secrets.PYPI_API_TOKEN }} - #additional_options: --patch - - nightly-merge: - runs-on: ubuntu-latest - needs: [release] - steps: - - name: Checkout - uses: actions/checkout@v3.5.2 - with: - fetch-depth: 0 - - - name: Nightly Merge - uses: robotology/gh-action-nightly-merge@v1.4.0 - with: - stable_branch: 'main' - development_branch: 'dev' - allow_ff: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - diff --git "a/.github/workflows/archive/\360\237\220\263Docker.yml" "b/.github/workflows/archive/\360\237\220\263Docker.yml" deleted file mode 100644 index 356ad655..00000000 --- "a/.github/workflows/archive/\360\237\220\263Docker.yml" +++ /dev/null @@ -1,60 +0,0 @@ - -name: 🐳Docker - -on: - release: - types: [published] - workflow_dispatch: - workflow_run: - workflows: ["🐍Build"] - branches: [ "main" ] - types: - - completed - -jobs: - push_to_registry: - name: 🐳 Build and Push Docker image to Docker Hub - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v3.5.2 - - - name: Prepare docker image name - id: image_names - run: | - IMAGES="${GITHUB_REPOSITORY/docker-/},ghcr.io/${GITHUB_REPOSITORY/docker-/}" - echo "docker_images=$IMAGES" >> $GITHUB_ENV - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v4 - with: - images: ${{ env.docker_images }} - tags: latest - - - name: Log in to the ghcr registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Log in to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v4 - with: - context: . - file: ./examples/Dockerfile - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - - # - name: 'Build Inventory Container Registry' - # run: | - # docker build -f examples/Dockerfile --tag ghcr.io/mraniki/${{ env.REPOSITORY_NAME }}:latest - # docker push ghcr.io/mraniki/${{ env.REPOSITORY_NAME }}:latest \ No newline at end of file diff --git "a/.github/workflows/archive/\360\237\224\217Security.yml.archive" "b/.github/workflows/archive/\360\237\224\217Security.yml.archive" deleted file mode 100644 index 957c720e..00000000 --- "a/.github/workflows/archive/\360\237\224\217Security.yml.archive" +++ /dev/null @@ -1,63 +0,0 @@ -name: 🔏Security - -on: [push, pull_request] - -jobs: - scanning: - name: GitGuardian scan - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 # fetch all history so multiple commits can be scanned - - name: GitGuardian scan - uses: GitGuardian/ggshield-action@master - env: - GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }} - GITHUB_PUSH_BASE_SHA: ${{ github.event.base }} - GITHUB_PULL_BASE_SHA: ${{ github.event.pull_request.base.sha }} - GITHUB_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} - GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }} - - - -# on: -# push: -# branches: [ "dev" ] -# schedule: -# - cron: '24 6 * * 5' - -# jobs: -# bandit: -# permissions: -# contents: read # for actions/checkout to fetch code -# security-events: write # for github/codeql-action/upload-sarif to upload SARIF results -# actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status - -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v3.5.2 -# - name: Bandit Scan -# uses: shundor/python-bandit-scan@9cc5aa4a006482b8a7f91134412df6772dbda22c -# with: # optional arguments -# # exit with 0, even with results found -# exit_zero: true # optional, default is DEFAULT -# # Github token of the repository (automatically created by Github) -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information. -# # File or directory to run bandit on -# # path: # optional, default is . -# # Report only issues of a given severity level or higher. Can be LOW, MEDIUM or HIGH. Default is UNDEFINED (everything) -# # level: # optional, default is UNDEFINED -# # Report only issues of a given confidence level or higher. Can be LOW, MEDIUM or HIGH. Default is UNDEFINED (everything) -# # confidence: # optional, default is UNDEFINED -# # comma-separated list of paths (glob patterns supported) to exclude from scan (note that these are in addition to the excluded paths provided in the config file) (default: .svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg) -# # excluded_paths: # optional, default is DEFAULT -# # comma-separated list of test IDs to skip -# # skips: # optional, default is DEFAULT -# # path to a .bandit file that supplies command line arguments -# # ini_path: # optional, default is DEFAULT - -# - name: PyCharm Python Security Scanner -# uses: tonybaloney/pycharm-security@1.28.0 - diff --git "a/.github/workflows/archive/\360\237\246\216build_dev.yml.archive" "b/.github/workflows/archive/\360\237\246\216build_dev.yml.archive" deleted file mode 100644 index 4790df28..00000000 --- "a/.github/workflows/archive/\360\237\246\216build_dev.yml.archive" +++ /dev/null @@ -1,49 +0,0 @@ - -name: 🦎BuildDev - -on: - push: - branches: [ "dev"] - pull_request: - branches: [ "dev"] - paths-ignore: - - "docs/**" - - "*.md" - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3.5.2 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - name: Lint Code Base - uses: github/super-linter@v5 - env: - VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: main - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Install dependencies - run: | - python -m pip install --upgrade pip twine - pip install poetry - poetry install - - name: Build package - run: poetry build - - # - name: Run Testing - # run: pip install pytest pytest-md pytest-emoji - # - uses: pavelzw/pytest-action@v2 - # with: - # emoji: false - # verbose: false - # job-summary: false - - # - name: Upload coverage reports to Codecov - # uses: codecov/codecov-action@v3 diff --git "a/.github/workflows/archive/\360\237\247\252test.yml.archive" "b/.github/workflows/archive/\360\237\247\252test.yml.archive" deleted file mode 100644 index 0e348d90..00000000 --- "a/.github/workflows/archive/\360\237\247\252test.yml.archive" +++ /dev/null @@ -1,64 +0,0 @@ - -name: 🧪Test - -on: [push, pull_request] - - -jobs: - test: - runs-on: ubuntu-latest - steps: - #------------------------------------ - # check-out repo and set-up python - #------------------------------------ - - name: Check out repository - uses: actions/checkout@v3.5.2 - - name: Set up python - id: setup-python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - #------------------------------------ - # ----- install & configure poetry - #------------------------------------ - - name: Install Poetry - uses: snok/install-poetry@v1 - with: - virtualenvs-create: true - virtualenvs-in-project: true - installer-parallel: true - - #------------------------------------ - # load cached venv if cache exists - #------------------------------------ - - name: Load cached venv - id: cached-poetry-dependencies - uses: actions/cache@v3 - with: - path: .venv - key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} - #------------------------------------ - # install dependencies if cache does not exist - #------------------------------------ - - name: Install dependencies - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - run: poetry install --no-interaction --no-root - #------------------------------------ - # install your root project, if required - #------------------------------------ - - name: Install project - run: poetry install --no-interaction - - #------------------------------------ - # run test suite and output coverage file - #------------------------------------ - - name: Test with pytest - run: poetry run pytest --cov . --cov-report=xml - - #------------------------------------ - # push to Codecov - #------------------------------------ - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git "a/.github/workflows/archive/\360\237\247\271cleanup.yml.archive" "b/.github/workflows/archive/\360\237\247\271cleanup.yml.archive" deleted file mode 100644 index 426f65e6..00000000 --- "a/.github/workflows/archive/\360\237\247\271cleanup.yml.archive" +++ /dev/null @@ -1,29 +0,0 @@ - -name: 🧹BranchCleanUp - -on: - workflow_run: - workflows: [🐍Build] - branches: [main] - types: - - completed - -jobs: - nightly-merge: - - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} - steps: - - name: Checkout - uses: actions/checkout@v3.5.2 - with: - fetch-depth: 0 - - - name: Nightly Merge - uses: robotology/gh-action-nightly-merge@v1.4.0 - with: - stable_branch: 'main' - development_branch: 'dev' - allow_ff: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}