Skip to content

updating syncronize #54

updating syncronize

updating syncronize #54

Workflow file for this run

name: unit-testing
on:
push:
pull_request:
types: [opened, synchronize, reopened]
jobs:
contentctl-unit-testing:
runs-on: ubuntu-latest
if: "!contains(github.ref, 'refs/tags/')" #don't run on tags - future steps won't run either since they depend on this job
# needs: [validate-tag-if-present, quit-for-dependabot]
steps:
- name: Check out the repository code
uses: actions/checkout@v3
with:
ref: develop
- uses: actions/setup-python@v4
with:
python-version: '3.11' #Available versions here - https://github.com/actions/python-versions/releases easy to change/make a matrix/use pypy
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Install System Packages
run: |
sudo apt update -qq
sudo apt install jq -qq
- name: Install Python Dependencies
run: |
pip install contentctl
git clone --depth=1 --single-branch --branch=master https://github.com/redcanaryco/atomic-red-team.git
- name: Run ContentCTL test for changes against develop
run: |
git pull
git checkout ${GITHUB_REF#refs/heads/}
echo "The target branch for this PR is ${{ github.base_ref }}"
contentctl test --disable-tqdm --post-test-behavior never_pause mode:changes --mode.target-branch ${{ github.base_ref }}
mkdir test_results
# cp summary.yml test_results/
cp test_results/summary.yml artifacts/
continue-on-error: true
- name: store_artifacts
uses: actions/upload-artifact@v3
with:
name: test_summary_results
path: |
test_results/summary.yml
dist/DA-ESS-ContentUpdate-latest.tar.gz
continue-on-error: true
- name: Print entire test_results/summary.yml
run: cat test_results/summary.yml
- name: Formatted Final Report
run: |
chmod +x .github/workflows/format_test_summary.sh
./.github/workflows/format_test_summary.sh >> $GITHUB_STEP_SUMMARY