Skip to content

NO-ENDPOINT: update notifier to look at doc_type #220

NO-ENDPOINT: update notifier to look at doc_type

NO-ENDPOINT: update notifier to look at doc_type #220

Workflow file for this run

name: Tests
on: [pull_request]
jobs:
build:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-go@v2
with:
go-version: '^1.20'
- run: go version
- name: Install Opensearch
uses: ankane/setup-opensearch@v1
with:
opensearch-version: 1.2
- name: Start LocalStack
env:
SERVICES: s3
DEBUG: 1
DATA_DIR: /tmp/localstack/data
KINESIS_PROVIDER: kinesalite
# These have to match up with the config in server.config.yaml
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
AWS_DEFAULT_REGION: us-east-1
run: |
# install LocalStack cli and awslocal
pip3 install cffi==1.15.1 cryptography==41.0.4 pyOpenSSL==23.2.0 pycparser==2.21
pip3 install awscli==1.29.54 awscli-local==0.21 boto3==1.28.54 botocore==1.31.54 cachetools==5.0.0 dill==0.3.2 dnslib==0.9.23 dnspython==2.4.2 docutils==0.16 ecdsa==0.18.0 jmespath==1.0.1 localstack==2.2.0 localstack-client==2.3 localstack-core==2.2.0 localstack-ext==2.2.0 markdown-it-py==3.0.0 mdurl==0.1.2 pbr==5.11.1 plux==1.4.0 psutil==5.9.5 pyaes==1.6.1 pygments==2.16.1 python-dateutil==2.8.2 python-dotenv==1.0.0 python-jose==3.3.0 rich==13.5.3 rsa==4.7.2 s3transfer==0.6.2 semver==3.0.1 stevedore==5.1.0 tabulate==0.9.0 tailer==0.4.1
# Make sure to pull the latest version of the image
docker pull localstack/localstack:2.2.0
# Start LocalStack in the background
localstack start -d
# Wait 30 seconds for the LocalStack container to become ready before timing out
echo "Waiting for LocalStack startup..."
localstack wait -t 30
echo "Startup complete"
- name: Initialize localstack
run: |
awslocal s3 mb s3://velociraptor
awslocal s3 ls
echo "Test Execution complete!"
- name: Run tests
run: |
make test
- name: Upload Build Artifacts
if: ${{ failure() }}
shell: bash
run: |
mkdir -p artifact_output/
go test -v ./vql/uploads/ ./foreman/ ./ingestion/ -update
cp -a ./vql/uploads/fixtures/* ./foreman/fixtures/* ./ingestion/fixtures/* artifact_output/
- uses: actions/upload-artifact@master
if: ${{ failure() }}
with:
name: artifact
path: artifact_output