forked from domain-protect/domain-protect
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rebase to primary domain-protect/main branch
- Loading branch information
1 parent
59bd106
commit d509163
Showing
5 changed files
with
139 additions
and
33 deletions.
There are no files selected for viewing
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,34 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
CodeQL-Build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'python' ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: ${{ matrix.language }} | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v3 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 | ||
with: | ||
category: "/language:${{matrix.language}}" |
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: Integration Tests | ||
on: | ||
push: | ||
|
||
jobs: | ||
integration_tests: | ||
name: Integration Test | ||
runs-on: ubuntu-latest | ||
permissions: | ||
checks: write # Required for Publish Test Results | ||
pull-requests: write # Required for Publish Test Results | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install -r requirements-dev.txt | ||
- name: test | ||
run: | | ||
pytest --cov=manual_scans --cov=utils --cov-branch --cov-fail-under=19 --junitxml=test_reports/junit-integration.xml integration_tests | ||
- name: Publish Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
if: always() | ||
with: | ||
files: "test_reports/junit-integration.xml" | ||
check_name: "Integration Test Results" | ||
comment_title: "Integration Test Results" |
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,36 @@ | ||
name: Formatting and Unit Tests | ||
on: | ||
push: | ||
|
||
jobs: | ||
unit_tests: | ||
name: Unit Test | ||
runs-on: ubuntu-latest | ||
permissions: | ||
checks: write # Required for Publish Test Results | ||
pull-requests: write # Required for Publish Test Results | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
cache: 'pip' # caching pip dependencies | ||
- run : pip install -r requirements-dev.txt | ||
|
||
- name: Linting and formatting | ||
uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --all-files --show-diff-on-failure | ||
|
||
- name: Unit tests | ||
run: | | ||
pytest --cov=manual_scans --cov=utils --cov-branch --cov-fail-under=15 unittests | ||
- name: Publish Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
if: always() | ||
with: | ||
files: "test_reports/*.xml" |
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
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