Skip to content

[resotocore][feat] Add AWS WAF Security #2499

[resotocore][feat] Add AWS WAF Security

[resotocore][feat] Add AWS WAF Security #2499

# Note: the testing steps are the same as resotocore_test but with different python runner
# Reason: coverage under pypy is super slow!
name: Coverage (resotocore)
on:
push:
branches:
- main
paths:
- 'resotocore/**'
- '.github/**'
- 'requirements-all.txt'
pull_request:
paths:
- 'resotocore/**'
- '.github/**'
- 'requirements-all.txt'
jobs:
resotocore-coverage:
name: "Coverage (resotocore)"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./resotocore
services:
arangodb:
image: arangodb:3.8.8
env:
ARANGO_NO_AUTH: 1
ports:
- 8529:8529
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
- name: Restore dependency cache
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{runner.os}}-pip-${{hashFiles('./resotocore/pyproject.toml')}}-${{hashFiles('./resotocore/requirements-test.txt')}}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r ../requirements-test.txt
pip install ../resotolib
- name: Run Tests
env:
RESOTOCORE_ANALYTICS_OPT_OUT: true
run: |
coverage run --source resotocore -m pytest
coverage combine
coverage xml
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: resotocore/coverage.xml
flags: resotocore