Class-based template engine. Replaces sqredirect usage, now compile ebpf programs and attach directly #20
This file contains hidden or 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
| # This workflow will install Python dependencies, run tests and lint with a single version of Python | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: tests | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - LICENSE | |
| - README.rst | |
| push: | |
| branches: [master] | |
| jobs: | |
| lint: | |
| name: Code quality checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout changes | |
| uses: actions/checkout@v2 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip poetry | |
| poetry config virtualenvs.create false | |
| poetry install --no-root | |
| rm -rf $(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')/tests | |
| - name: Lint with flake8 | |
| run: | | |
| python -m flake8 --jobs 4 --statistics --show-source source_query_proxy tests | |
| - name: Check code formatting with black | |
| run: | | |
| python -m black --target-version=py38 --skip-string-normalization --line-length=120 --check source_query_proxy tests | |
| tests: | |
| name: test with Py${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.8', '3.9', '3.10', '3.11'] | |
| steps: | |
| - name: Checkout changes | |
| uses: actions/checkout@v2 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # remove tests package because it's conflict with our tests directory | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip poetry | |
| poetry config virtualenvs.create false | |
| poetry install --no-root | |
| rm -rf $(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')/tests | |
| - name: Test with pytest | |
| run: | | |
| python -m pytest --cov=source_query_proxy --cov-report=xml --cov-report=term -v | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v3 | |
| if: matrix.python-version == '3.11' | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false |