Skip to content

Return all results from an aggregated ES query #134

Return all results from an aggregated ES query

Return all results from an aggregated ES query #134

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.18'
- 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 pyOpenSSL --upgrade
pip3 install localstack awscli-local[ver1]
# Make sure to pull the latest version of the image
docker pull localstack/localstack
# 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