feat(ci): fix CI, switch to self-hosted SonarQube (#310)
Some checks failed
Release / Publish to PyPI (push) Has been skipped
Release / Create Release (push) Has been skipped
Release / Print Release (push) Has been skipped
Release / Build Wheel File (push) Has been skipped
Release / Test (push) Failing after 4s
Release / Publish Docker Images (push) Has been skipped
Security / sonarqube (push) Successful in 2m20s
Security / snyk (push) Successful in 1m35s
Some checks failed
Release / Publish to PyPI (push) Has been skipped
Release / Create Release (push) Has been skipped
Release / Print Release (push) Has been skipped
Release / Build Wheel File (push) Has been skipped
Release / Test (push) Failing after 4s
Release / Publish Docker Images (push) Has been skipped
Security / sonarqube (push) Successful in 2m20s
Security / snyk (push) Successful in 1m35s
Reviewed-on: #310
This commit is contained in:
30
.archive/.github/archive/.deepsource.toml
vendored
Normal file
30
.archive/.github/archive/.deepsource.toml
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
version = 1
|
||||
|
||||
test_patterns = ["tests/**"]
|
||||
|
||||
exclude_patterns = [
|
||||
".github/workflows/**",
|
||||
".gitignore",
|
||||
"CODEOWNERS",
|
||||
"LICENSE.md",
|
||||
"README.md",
|
||||
"codecov.yml",
|
||||
"renovate.json",
|
||||
"requirements-dev.txt",
|
||||
"requirements.txt"
|
||||
]
|
||||
|
||||
[[analyzers]]
|
||||
name = "python"
|
||||
enabled = true
|
||||
|
||||
[analyzers.meta]
|
||||
runtime_version = "3.x.x"
|
||||
|
||||
[[analyzers]]
|
||||
name = "test-coverage"
|
||||
enabled = true
|
||||
|
||||
[[transformers]]
|
||||
name = "black"
|
||||
enabled = true
|
2
.archive/.github/archive/codecov.yml
vendored
Normal file
2
.archive/.github/archive/codecov.yml
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
ignore:
|
||||
- "*/tests/*”
|
42
.archive/.github/archive/renovate.json
vendored
Normal file
42
.archive/.github/archive/renovate.json
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
],
|
||||
"platformCommit": true,
|
||||
"dependencyDashboardAutoclose": true,
|
||||
"assignAutomerge": true,
|
||||
"assigneesFromCodeOwners": true,
|
||||
"rebaseWhen": "behind-base-branch",
|
||||
"rollbackPrs": true,
|
||||
"labels": [
|
||||
"dependencies"
|
||||
],
|
||||
"packageRules": [
|
||||
{
|
||||
"matchPackagePatterns": [
|
||||
"black",
|
||||
"pylint"
|
||||
],
|
||||
"labels": [
|
||||
"linting"
|
||||
]
|
||||
},
|
||||
{
|
||||
"matchPackagePatterns": [
|
||||
"coverage",
|
||||
"pytest"
|
||||
],
|
||||
"labels": [
|
||||
"unit-tests"
|
||||
]
|
||||
}
|
||||
],
|
||||
"vulnerabilityAlerts": {
|
||||
"enabled": true,
|
||||
"labels": [
|
||||
"security"
|
||||
],
|
||||
"commitMessagePrefix": "[SECURITY] ",
|
||||
"prCreation": "immediate"
|
||||
}
|
||||
}
|
89
.archive/.github/archive/workflows-disabled/ci-branch-main.yml
vendored
Normal file
89
.archive/.github/archive/workflows-disabled/ci-branch-main.yml
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
name: CI - Merge to main
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'LICENSE.md'
|
||||
- 'CHANGELOG.md'
|
||||
- '.gitignore'
|
||||
- 'renovate.json'
|
||||
- 'CODEOWNERS'
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt && pip install -r requirements-dev.txt
|
||||
- name: Lint
|
||||
run: pylint --recursive=yes .
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [ '3.10' ]
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt && pip install -r requirements-dev.txt
|
||||
- name: Run test suite
|
||||
run: coverage run -m py.test -v
|
||||
- name: Upload Coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
|
||||
build:
|
||||
needs:
|
||||
- lint
|
||||
- test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
# - name: Install dependencies
|
||||
# run: pip install -r requirements.txt && pip install -r requirements-dev.txt
|
||||
- name: Install build dependencies
|
||||
run: pip install setuptools wheel
|
||||
- name: Build wheel file
|
||||
run: python setup.py bdist_wheel
|
||||
- id: skip_check
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: whl
|
||||
path: dist/
|
||||
|
||||
publish:
|
||||
needs: build
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create dist folder
|
||||
run: |
|
||||
mkdir -p dist
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: whl
|
||||
path: dist
|
||||
- name: Publish to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
110
.archive/.github/archive/workflows-disabled/ci-development.yml
vendored
Normal file
110
.archive/.github/archive/workflows-disabled/ci-development.yml
vendored
Normal file
@ -0,0 +1,110 @@
|
||||
name: CI - Development
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- '!main'
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'LICENSE.md'
|
||||
- 'CHANGELOG.md'
|
||||
- '.gitignore'
|
||||
- 'renovate.json'
|
||||
- 'CODEOWNERS'
|
||||
|
||||
jobs:
|
||||
skip_duplicate:
|
||||
name: Skip if duplicate run
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||
steps:
|
||||
- id: skip_check
|
||||
uses: fkirc/skip-duplicate-actions@v4.0.0
|
||||
with:
|
||||
github_token: ${{ github.token }}
|
||||
|
||||
analyze:
|
||||
name: Analyze
|
||||
needs: skip_duplicate
|
||||
if: ${{ needs.skip_duplicate.outputs.should_skip == 'false' }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: python
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
needs: skip_duplicate
|
||||
if: ${{ needs.skip_duplicate.outputs.should_skip == 'false' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt && pip install -r requirements-dev.txt
|
||||
- name: Lint
|
||||
run: pylint --recursive=yes .
|
||||
|
||||
test:
|
||||
name: Run unit tests
|
||||
needs: skip_duplicate
|
||||
if: ${{ needs.skip_duplicate.outputs.should_skip == 'false' }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [ '3.10' ]
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt && pip install -r requirements-dev.txt
|
||||
- name: Run test suite
|
||||
run: coverage run -m py.test -v
|
||||
- name: Upload Coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
|
||||
build:
|
||||
name: Build
|
||||
needs:
|
||||
- lint
|
||||
- test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- name: Install build dependencies
|
||||
run: pip install setuptools wheel
|
||||
- name: Build wheel file
|
||||
run: python setup.py bdist_wheel
|
||||
- id: skip_check
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: whl
|
||||
path: dist/
|
69
.archive/.github/archive/workflows-disabled/merge-to-main.yml
vendored
Normal file
69
.archive/.github/archive/workflows-disabled/merge-to-main.yml
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
name: Merge to main
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
coverage:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt && pip install -r requirements-dev.txt
|
||||
- name: Run test suite
|
||||
run: |
|
||||
coverage run -m py.test -v --junitxml=testresults.xml
|
||||
coverage xml
|
||||
- uses: sonarsource/sonarqube-scan-action@master
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
|
||||
- uses: sonarsource/sonarqube-quality-gate-action@master
|
||||
timeout-minutes: 5
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
|
||||
build:
|
||||
needs: coverage
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- name: Install build dependencies
|
||||
run: pip install setuptools wheel
|
||||
- name: Build wheel file
|
||||
run: python setup.py bdist_wheel
|
||||
- id: skip_check
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: whl
|
||||
path: dist/
|
||||
|
||||
publish:
|
||||
needs: build
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create dist folder
|
||||
run: mkdir -p dist
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: whl
|
||||
path: dist
|
||||
- name: Publish to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
67
.archive/.github/archive/workflows-disabled/pull-request.yml
vendored
Normal file
67
.archive/.github/archive/workflows-disabled/pull-request.yml
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
name: CI - Pull request
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'LICENSE.md'
|
||||
- 'CHANGELOG.md'
|
||||
- '.gitignore'
|
||||
- 'renovate.json'
|
||||
- 'CODEOWNERS'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: python
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt && pip install -r requirements-dev.txt
|
||||
- name: Lint
|
||||
run: pylint --recursive=yes .
|
||||
|
||||
test:
|
||||
name: Run unit tests
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [ '3.10' ]
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt && pip install -r requirements-dev.txt
|
||||
- name: Run test suite
|
||||
run: coverage run -m py.test -v
|
||||
- name: Upload Coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
Reference in New Issue
Block a user