-
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.
Merge branch 'master' into chore/update-to-python-3.11
- Loading branch information
Showing
724 changed files
with
20,334 additions
and
18,390 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,7 @@ jobs: | |
# version changes | ||
- docker-compose.dev.yml | ||
- Dockerfile | ||
- cypress/** | ||
# Job that lists and chunks spec file names and caches node modules | ||
chunks: | ||
|
@@ -211,7 +212,10 @@ jobs: | |
- name: Wait for PostHog | ||
# these are required checks so, we can't skip entire sections | ||
if: needs.changes.outputs.shouldTriggerCypress == 'true' | ||
uses: iFaxity/wait-on-action@v1 | ||
# this action might be abandoned - but v1 doesn't point to latest of v1 (which it should) | ||
# so pointing to v1.1.0 to remove warnings about node version with v1 | ||
# todo check https://github.com/iFaxity/wait-on-action/releases for new releases | ||
uses: iFaxity/[email protected] | ||
timeout-minutes: 3 | ||
with: | ||
verbose: true | ||
|
@@ -221,12 +225,16 @@ jobs: | |
- name: Cypress run | ||
# these are required checks so, we can't skip entire sections | ||
if: needs.changes.outputs.shouldTriggerCypress == 'true' | ||
uses: cypress-io/github-action@v5 | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
config-file: cypress.e2e.config.ts | ||
config: retries=2 | ||
spec: ${{ matrix.chunk }} | ||
install: false | ||
env: | ||
E2E_TESTING: 1 | ||
OPT_OUT_CAPTURE: 0 | ||
GITHUB_ACTION_RUN_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' | ||
|
||
- name: Archive test screenshots | ||
uses: actions/upload-artifact@v3 | ||
|
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
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 |
---|---|---|
@@ -1,16 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# Install scripts for M1 Macs | ||
# See https://github.com/PostHog/posthog/issues/2916 | ||
# NB: use cryptography==3.4.7 | ||
## NOTE: This is a helper script to simplify the process of getting setup on macOS. If in doubt check https://posthog.com/handbook/engineering/developing-locally | ||
|
||
# Set ld flags to use OpenSSL installed with brew | ||
export LDFLAGS="-L$(brew --prefix openssl)/lib" | ||
export CPPFLAGS="-I$(brew --prefix openssl)/include" | ||
set -e | ||
|
||
# Use system OpenSSL instead of BoringSSL for GRPC | ||
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 | ||
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 | ||
echo "Attempting to install all dependencies and setup virtualenv..." | ||
echo "" | ||
|
||
pip cache purge | ||
pip install -r requirements.txt | ||
# Ensure we are in a directory ending with "posthog" | ||
if [[ "$PWD" != *"/posthog" ]]; then | ||
echo "Please run this script from a directory ending with 'posthog'" | ||
exit 1 | ||
fi | ||
|
||
if [[ $* == *--reset* ]]; then | ||
rm -rf env/ | ||
fi | ||
|
||
python3.10 -m venv env | ||
source env/bin/activate | ||
|
||
brew install openssl | ||
CFLAGS="-I /opt/homebrew/opt/openssl/include $(python3.10-config --includes)" LDFLAGS="-L /opt/homebrew/opt/openssl/lib" GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 pip install -r requirements.txt | ||
|
||
pip install -r requirements-dev.txt | ||
|
||
echo "" | ||
echo "🚀 Done!" |
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
python manage.py migrate --check | ||
python manage.py migrate_clickhouse --check | ||
python manage.py run_async_migrations --check | ||
if [ -z "$POSTHOG_SKIP_MIGRATION_CHECKS" ]; then | ||
python manage.py migrate --check | ||
python manage.py migrate_clickhouse --check | ||
python manage.py run_async_migrations --check | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
describe('Early Access Management', () => { | ||
beforeEach(() => { | ||
cy.visit('/early_access_features') | ||
}) | ||
|
||
it('Early access feature new and list', () => { | ||
// load an empty early access feature page | ||
cy.get('h1').should('contain', 'Early Access Management') | ||
cy.title().should('equal', 'Early Access Management • PostHog') | ||
cy.get('h2').should('contain', 'Create your first feature') | ||
cy.get('[data-attr="product-introduction-docs-link"]').should( | ||
'contain', | ||
'Learn more about Early access features' | ||
) | ||
|
||
// go to create a new feature | ||
cy.get('[data-attr="create-feature"]').click() | ||
|
||
// New Feature Release page | ||
cy.get('h1').should('contain', 'New Feature Release') | ||
|
||
// cancel new feature | ||
cy.get('[data-attr="cancel-feature"]').click() | ||
cy.get('h1').should('contain', 'Early Access Management') | ||
|
||
// set feature name & description | ||
cy.get('[data-attr="create-feature"]').click() | ||
cy.get('[data-attr="feature-name"]').type('Test Feature') | ||
cy.get('[data-attr="save-feature').should('contain.text', 'Save as draft') | ||
|
||
// save | ||
cy.get('[data-attr="save-feature"]').click() | ||
cy.get('[data-attr=success-toast]').contains('Early Access Feature saved').should('exist') | ||
|
||
// back to features | ||
cy.visit('/early_access_features') | ||
cy.get('tbody').contains('Test Feature') | ||
cy.get('h2').should('not.have.text', 'Create your first feature') | ||
|
||
// edit feature | ||
cy.get('a.Link').contains('.row-name', 'Test Feature').click() | ||
cy.get('[data-attr="edit-feature"]').click() | ||
cy.get('h1').should('contain', 'Test Feature') | ||
cy.get('[data-attr="save-feature"]').should('contain.text', 'Save') | ||
|
||
// delete feature | ||
cy.get('[data-attr="save-feature"]').click() | ||
cy.get('[data-attr="delete-feature"]').click() | ||
cy.get('h3').should('contain', 'Permanently delete feature?') | ||
cy.get('[data-attr="confirm-delete-feature"]').click() | ||
cy.get('[data-attr=info-toast]') | ||
.contains('Early access feature deleted. Remember to delete corresponding feature flag if necessary') | ||
.should('exist') | ||
}) | ||
}) |
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.