Add sample for capa-rules 935 #513
Workflow file for this run
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
name: Tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
# file name consistency | |
test_filenames: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout testfiles repository | |
uses: actions/checkout@b80ff79f1755d06ba70441c368a6fe801f5f3a62 # v4.1.6 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
with: | |
python-version: 3.8 | |
- name: Test repository files | |
run: python .github/check_sample_filenames.py . | |
# to allow quicker tests, capa should run less than THRESHOLD seconds on added/modified test files | |
test_runtime: | |
runs-on: ubuntu-20.04 | |
steps: | |
# We check the submodules separately as the rules submodule's reference may not be our PR/master | |
- name: Checkout capa without submodules | |
uses: actions/checkout@b80ff79f1755d06ba70441c368a6fe801f5f3a62 # v4.1.6 | |
with: | |
repository: mandiant/capa | |
- name: Checkout capa-rules | |
uses: actions/checkout@b80ff79f1755d06ba70441c368a6fe801f5f3a62 # v4.1.6 | |
with: | |
repository: mandiant/capa-rules | |
path: rules | |
- name: Checkout capa-testfiles | |
uses: actions/checkout@b80ff79f1755d06ba70441c368a6fe801f5f3a62 # v4.1.6 | |
with: | |
path: tests/data | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
with: | |
python-version: 3.8 | |
- name: Install capa | |
run: pip install -e . | |
- name: Get modified files | |
id: files | |
uses: Ana06/[email protected] | |
- name: Check capa runtime on modified files | |
run: | | |
cd tests/data | |
python .github/check_runtimes.py ${{ steps.files.outputs.all }} |