Files
splunk-security_content/.github/workflows/code-testing.yml
T
pyth0n1c 51edd7950a Condensed multiple requirements.txt
files into single requirements.txt in
the root of security_content.
Removed explicit calls to python3
in CI/CD workflows and inside of
the docker_detection_testing tool.
These are not required and in fact
should not be done since python
interpreters started by the
detection tester inherit the
venv the parent was run under.
2022-07-20 15:53:20 -07:00

37 lines
1.1 KiB
YAML

name: code-testing
on:
push:
jobs:
code-testing:
runs-on: ubuntu-latest
steps:
- name: Check out the repository code
uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9' #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: |
#Get the virtualenv set up
rm -rf venv
python -m venv --clear venv
source venv/bin/activate
python -m pip install --upgrade pip
python -m pip install wheel
python -m pip install -q -r requirements.txt
- name: test code with pytest
run: |
source venv/bin/activate
export PYTHONPATH=$PYTHONPATH:/home/runner/work/security_content
pytest -s bin/contentctl_project