-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cdp): Use cyclotron part 2 (#24746)
- Loading branch information
1 parent
e809e58
commit 7fd0fbb
Showing
29 changed files
with
1,069 additions
and
529 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,6 @@ jobs: | |
defaults: | ||
run: | ||
working-directory: 'plugin-server' | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
|
@@ -82,6 +81,7 @@ jobs: | |
tests: | ||
name: Plugin Server Tests (${{matrix.shard}}) | ||
needs: changes | ||
if: needs.changes.outputs.plugin-server == 'true' | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
|
@@ -97,21 +97,17 @@ jobs: | |
|
||
steps: | ||
- name: Code check out | ||
if: needs.changes.outputs.plugin-server == 'true' | ||
uses: actions/checkout@v3 | ||
|
||
- name: Stop/Start stack with Docker Compose | ||
if: needs.changes.outputs.plugin-server == 'true' | ||
run: | | ||
docker compose -f docker-compose.dev.yml down | ||
docker compose -f docker-compose.dev.yml up -d | ||
- name: Add Kafka to /etc/hosts | ||
if: needs.changes.outputs.plugin-server == 'true' | ||
run: echo "127.0.0.1 kafka" | sudo tee -a /etc/hosts | ||
|
||
- name: Set up Python | ||
if: needs.changes.outputs.plugin-server == 'true' | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11.9 | ||
|
@@ -122,50 +118,57 @@ jobs: | |
# uv is a fast pip alternative: https://github.com/astral-sh/uv/ | ||
- run: pip install uv | ||
|
||
- name: Install rust | ||
uses: dtolnay/[email protected] | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
rust/target | ||
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Install sqlx-cli | ||
working-directory: rust | ||
run: cargo install [email protected] --no-default-features --features native-tls,postgres | ||
|
||
- name: Install SAML (python3-saml) dependencies | ||
if: needs.changes.outputs.plugin-server == 'true' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl | ||
- name: Install python dependencies | ||
if: needs.changes.outputs.plugin-server == 'true' | ||
run: | | ||
uv pip install --system -r requirements-dev.txt | ||
uv pip install --system -r requirements.txt | ||
- name: Install pnpm | ||
if: needs.changes.outputs.plugin-server == 'true' | ||
uses: pnpm/action-setup@v4 | ||
|
||
- name: Set up Node.js | ||
if: needs.changes.outputs.plugin-server == 'true' | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.12.1 | ||
cache: pnpm | ||
cache-dependency-path: plugin-server/pnpm-lock.yaml | ||
|
||
- name: Install package.json dependencies with pnpm | ||
if: needs.changes.outputs.plugin-server == 'true' | ||
run: cd plugin-server && pnpm i | ||
|
||
- name: Wait for Clickhouse, Redis & Kafka | ||
if: needs.changes.outputs.plugin-server == 'true' | ||
run: | | ||
docker compose -f docker-compose.dev.yml up kafka redis clickhouse -d --wait | ||
bin/check_kafka_clickhouse_up | ||
- name: Set up databases | ||
if: needs.changes.outputs.plugin-server == 'true' | ||
env: | ||
TEST: 'true' | ||
SECRET_KEY: 'abcdef' # unsafe - for testing only | ||
DATABASE_URL: 'postgres://posthog:posthog@localhost:5432/posthog' | ||
run: cd plugin-server && pnpm setup:test | ||
|
||
- name: Test with Jest | ||
if: needs.changes.outputs.plugin-server == 'true' | ||
env: | ||
# Below DB name has `test_` prepended, as that's how Django (ran above) creates the test DB | ||
DATABASE_URL: 'postgres://posthog:posthog@localhost:5432/test_posthog' | ||
|
This file contains 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 file contains 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 file contains 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 file contains 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 file contains 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
Oops, something went wrong.