forked from EmpireProject/Empire
-
-
Notifications
You must be signed in to change notification settings - Fork 589
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #680 from BC-SECURITY/release/5.5.3
v5.5.3 into main
- Loading branch information
Showing
107 changed files
with
8,900 additions
and
5,506 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ jobs: | |
needs: | ||
- matrix-prep-config | ||
- lint | ||
timeout-minutes: 15 | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
name: Test Python ${{ matrix.python-version }} | ||
strategy: | ||
|
@@ -76,16 +76,16 @@ jobs: | |
poetry install | ||
- name: Run test suite - mysql | ||
run: | | ||
DATABASE_USE=mysql poetry run pytest . -v | ||
DATABASE_USE=mysql poetry run pytest . -v --runslow | ||
- name: Run test suite - sqlite | ||
if: ${{ startsWith(github.head_ref, 'release/') || contains(github.event.pull_request.labels.*.name, 'test-sqlite') }} | ||
run: | | ||
DATABASE_USE=sqlite poetry run pytest . -v | ||
DATABASE_USE=sqlite poetry run pytest . -v --runslow | ||
test_image: | ||
# To save CI time, only run these tests on the release PRs | ||
if: ${{ startsWith(github.head_ref, 'release/') }} | ||
timeout-minutes: 20 | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
name: Test Docker Image | ||
steps: | ||
|
@@ -118,81 +118,81 @@ jobs: | |
submodules: 'recursive' | ||
depth: 0 | ||
token: ${{ secrets.RELEASE_TOKEN }} | ||
# To save CI time, only run these tests when the install script is changed | ||
# To save CI time, only run these tests when the install script or deps changed | ||
- name: Get changed files using defaults | ||
id: changed-files | ||
uses: tj-actions/[email protected] | ||
- name: Build images | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') || contains(steps.changed-files.outputs.modified_files, 'poetry.lock') | ||
run: docker-compose -f .github/install_tests/docker-compose-install-tests.yml build --parallel | ||
- name: run structure tests base Ubuntu 20.04 | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') || contains(steps.changed-files.outputs.modified_files, 'poetry.lock') | ||
uses: plexsystems/[email protected] | ||
with: | ||
image: docker.io/bcsecurity/empire-test-ubuntu2004:latest | ||
config: .github/cst-config-base.yaml | ||
- name: run structure tests Ubuntu 20.04 | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') || contains(steps.changed-files.outputs.modified_files, 'poetry.lock') | ||
uses: plexsystems/[email protected] | ||
with: | ||
image: docker.io/bcsecurity/empire-test-ubuntu2004:latest | ||
config: .github/install_tests/cst-config-ubuntu2004.yaml | ||
- name: run structure tests base Ubuntu 22.04 | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') || contains(steps.changed-files.outputs.modified_files, 'poetry.lock') | ||
uses: plexsystems/[email protected] | ||
with: | ||
image: docker.io/bcsecurity/empire-test-ubuntu2204:latest | ||
config: .github/cst-config-base.yaml | ||
- name: run structure tests Ubuntu 22.04 | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') || contains(steps.changed-files.outputs.modified_files, 'poetry.lock') | ||
uses: plexsystems/[email protected] | ||
with: | ||
image: docker.io/bcsecurity/empire-test-ubuntu2204:latest | ||
config: .github/install_tests/cst-config-ubuntu2204.yaml | ||
- name: run structure tests base Debian 10 | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') || contains(steps.changed-files.outputs.modified_files, 'poetry.lock') | ||
uses: plexsystems/[email protected] | ||
with: | ||
image: docker.io/bcsecurity/empire-test-debian10:latest | ||
config: .github/cst-config-base.yaml | ||
- name: run structure tests Debian 10 | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') || contains(steps.changed-files.outputs.modified_files, 'poetry.lock') | ||
uses: plexsystems/[email protected] | ||
with: | ||
image: docker.io/bcsecurity/empire-test-debian10:latest | ||
config: .github/install_tests/cst-config-debian10.yaml | ||
- name: run structure tests base Debian 11 | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') || contains(steps.changed-files.outputs.modified_files, 'poetry.lock') | ||
uses: plexsystems/[email protected] | ||
with: | ||
image: docker.io/bcsecurity/empire-test-debian11:latest | ||
config: .github/cst-config-base.yaml | ||
- name: run structure tests Debian 11 | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') || contains(steps.changed-files.outputs.modified_files, 'poetry.lock') | ||
uses: plexsystems/[email protected] | ||
with: | ||
image: docker.io/bcsecurity/empire-test-debian11:latest | ||
config: .github/install_tests/cst-config-debian11.yaml | ||
- name: run structure tests Kali base | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') || contains(steps.changed-files.outputs.modified_files, 'poetry.lock') | ||
uses: plexsystems/[email protected] | ||
with: | ||
image: docker.io/bcsecurity/empire-test-kalirolling:latest | ||
config: .github/cst-config-base.yaml | ||
- name: run structure tests Kali | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') || contains(steps.changed-files.outputs.modified_files, 'poetry.lock') | ||
uses: plexsystems/[email protected] | ||
with: | ||
image: docker.io/bcsecurity/empire-test-kalirolling:latest | ||
config: .github/install_tests/cst-config-kalirolling.yaml | ||
- name: run structure tests Parrot base | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') || contains(steps.changed-files.outputs.modified_files, 'poetry.lock') | ||
uses: plexsystems/[email protected] | ||
with: | ||
image: docker.io/bcsecurity/empire-test-parrotrolling:latest | ||
config: .github/cst-config-base.yaml | ||
- name: run structure tests Parrot | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') | ||
if: contains(steps.changed-files.outputs.modified_files, 'setup/install.sh') || contains(steps.changed-files.outputs.modified_files, 'poetry.lock') | ||
uses: plexsystems/[email protected] | ||
with: | ||
image: docker.io/bcsecurity/empire-test-parrotrolling:latest | ||
|
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 |
---|---|---|
|
@@ -31,13 +31,6 @@ jobs: | |
run: | | ||
# Get the version from pyproject.toml using sed | ||
echo "APP_VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' pyproject.toml)" >> $GITHUB_ENV | ||
- name: Update Starkiller Version | ||
if: ${{ github.event.inputs.starkillerVersion }} | ||
uses: ./.github/actions/update-starkiller | ||
with: | ||
starkiller-version: ${{ env.STARKILLER_TAG }} | ||
app-version: ${{ env.APP_VERSION }} | ||
changelog-path: CHANGELOG-SPONSORS.md | ||
- name: Update Sponsors Changelog | ||
uses: vinnybod/[email protected] | ||
with: | ||
|
@@ -50,6 +43,13 @@ jobs: | |
git add -A | ||
git commit --message "Prepare release ${{ env.APP_VERSION }} sponsors" | ||
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | ||
- name: Update Starkiller Version | ||
if: ${{ github.event.inputs.starkillerVersion }} | ||
uses: ./.github/actions/update-starkiller | ||
with: | ||
starkiller-version: ${{ env.STARKILLER_TAG }} | ||
app-version: ${{ env.APP_VERSION }} | ||
changelog-path: CHANGELOG-SPONSORS.md | ||
- name: Get release branch name | ||
run: | | ||
echo "RELEASE_BRANCH=release/$APP_VERSION-sponsors" >> $GITHUB_ENV | ||
|
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
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,21 @@ | ||
import pytest | ||
|
||
|
||
def pytest_addoption(parser): | ||
parser.addoption( | ||
"--runslow", action="store_true", default=False, help="run slow tests" | ||
) | ||
|
||
|
||
def pytest_configure(config): | ||
config.addinivalue_line("markers", "slow: mark test as slow to run") | ||
|
||
|
||
def pytest_collection_modifyitems(config, items): | ||
if config.getoption("--runslow"): | ||
# --runslow given in cli: do not skip slow tests | ||
return | ||
skip_slow = pytest.mark.skip(reason="need --runslow option to run") | ||
for item in items: | ||
if "slow" in item.keywords: | ||
item.add_marker(skip_slow) |
Oops, something went wrong.