Fixed mandatory non-empty path on pub/sub #831
Workflow file for this run
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
| name: Linting and Testing | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| bandit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Security check - Bandit | |
| uses: joshvote/[email protected] | |
| with: | |
| project_path: . | |
| ignore_failure: false | |
| config_file: pyproject.toml | |
| - name: Security check report artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: Security report | |
| path: output/security_report.txt | |
| overwrite: true | |
| flake8_py311: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Setup Python | |
| uses: actions/[email protected] | |
| with: | |
| python-version: "3.11" | |
| - name: Setup flake8 annotations | |
| uses: rbialon/flake8-annotations@v1 | |
| - name: Lint with flake8 | |
| if: always() | |
| run: | | |
| pip install flake8 | |
| flake8 . --count --statistics | |
| black_formatting: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: psf/black@stable | |
| mypy_py311: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Setup Python | |
| uses: actions/[email protected] | |
| with: | |
| python-version: "3.11" | |
| - name: Install Dependencies | |
| run: | | |
| pip install .[dev] | |
| - name: Add mypy annotator | |
| uses: pr-annotators/[email protected] | |
| - name: Run mypy | |
| run: | | |
| mypy src/ | |
| docker_build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v1 | |
| - name: Build and push Docker image | |
| run: | | |
| echo $'{ "experimental": true, "features": { "buildkit" : true } }' | sudo tee /etc/docker/daemon.json | |
| echo '${{ secrets.BSGIP_PAT }}' > ./github.pat | |
| echo '${{ secrets.GITLAB_PAT }}' > ./gitlab.pat | |
| sudo service docker restart | |
| docker version -f '{{.Server.Experimental}}' | |
| docker build -t envoy:test -f Dockerfile.server --secret id=github_pat,src=github.pat . --no-cache | |
| pytest: | |
| strategy: | |
| matrix: | |
| pyver: ["3.10", "3.11", "3.12"] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Setup Python | |
| uses: actions/[email protected] | |
| with: | |
| python-version: ${{ matrix.pyver }} | |
| - name: Install Dependencies | |
| run: | | |
| sudo apt install -y postgresql | |
| pip install .[test] | |
| - name: Run Pytest | |
| run: | | |
| pytest -n auto --junit-xml=.test_report_py${{ matrix.pyver }}.xml | |
| - name: Upload Results | |
| uses: test-summary/action@v1 | |
| with: | |
| paths: .test_report_py${{ matrix.pyver }}.xml | |
| if: always() | |
| alembic: | |
| runs-on: ubuntu-latest | |
| env: | |
| DATABASE_URL: postgresql+asyncpg://envoyuser:envoypass@postgres:5432/envoydb | |
| container: python:3.11-slim | |
| services: | |
| postgres: | |
| image: postgres | |
| env: | |
| POSTGRES_PASSWORD: envoypass | |
| POSTGRES_USER: envoyuser | |
| POSTGRES_DB: envoydb | |
| # Set health checks to wait until postgres has started | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Install Dependencies | |
| run: | | |
| pip install . | |
| - name: Upgrade | |
| run: | | |
| cd src/envoy/server/ | |
| alembic upgrade head | |
| - name: Downgrade | |
| run: | | |
| cd src/envoy/server/ | |
| alembic downgrade base |