-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
80 additions
and
4 deletions.
There are no files selected for viewing
File renamed without changes.
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,76 @@ | ||
name: Run tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
- test/** | ||
paths: | ||
- Payload_Type/thanatos/agent/** | ||
- Payload_Type/thanatos/mythic/** | ||
- .github/** | ||
|
||
workflow_call: | ||
|
||
env: | ||
AGENT_CODE: Payload_Type/thanatos/agent | ||
MYTHIC_CODE: Payload_Type/thanatos/mythic | ||
|
||
|
||
jobs: | ||
agent: | ||
name: Agent tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup environment | ||
uses: ./.github/actions/setup-env | ||
with: | ||
agent-code: ${{ env.AGENT_CODE }} | ||
mythic-code: ${{ env.MYTHIC_CODE }} | ||
|
||
- name: Run agent tests | ||
working-directory: ${{ env.AGENT_CODE }} | ||
run: | | ||
make genconfig | ||
env CONFIG=$(pwd)/.config.bin cargo test --color always --workspace --exclude genconfig --all-targets --all-features | ||
commands: | ||
name: Run Mythic command tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup environment | ||
uses: ./.github/actions/setup-lint | ||
with: | ||
agent-code: ${{ env.AGENT_CODE }} | ||
mythic-code: ${{ env.MYTHIC_CODE }} | ||
|
||
- name: Run command tests | ||
working-directory: ${{ env.MYTHIC_CODE }} | ||
run: go test ./commands/... | ||
|
||
mockbuild: | ||
name: Run payload mock build tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup environment | ||
uses: ./.github/actions/setup-lint | ||
with: | ||
agent-code: ${{ env.AGENT_CODE }} | ||
mythic-code: ${{ env.MYTHIC_CODE }} | ||
|
||
- name: Run mockbuild tests | ||
working-directory: ${{ env.MYTHIC_CODE }} | ||
run: go test -run "^TestPayloadMockBuild/" ./builder |
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