Skip to content

Commit

Permalink
Revert "chore: syphar is deprecated. fangle python actions (#21249)"
Browse files Browse the repository at this point in the history
This reverts commit ea522d8.
  • Loading branch information
xvello authored Apr 2, 2024
1 parent 1df2542 commit a788113
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 28 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ jobs:
cache-dependency-path: '**/requirements*.txt'
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}

# uv is a fast pip alternative: https://github.com/astral-sh/uv/
- run: pip install uv
- uses: syphar/restore-virtualenv@v1
id: cache-benchmark-tests

- name: Install SAML (python3-saml) dependencies
shell: bash
Expand All @@ -69,12 +69,13 @@ jobs:
sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
- name: Install python dependencies
if: steps.cache-benchmark-tests.outputs.cache-hit != 'true'
run: |
uv pip install --system -r requirements-dev.txt
uv pip install --system -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m pip install -r requirements.txt
- name: Install asv
run: uv pip install --system asv==0.5.1 virtualenv
run: python -m pip install asv==0.5.1 virtualenv

- name: Set up PostHog
run: |
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/build-hogql-parser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,8 @@ jobs:
if: matrix.os == 'ubuntu-22.04' # Only build the sdist once
run: cd hogql_parser && python setup.py sdist

# uv is a fast pip alternative: https://github.com/astral-sh/uv/
- run: pip install uv

- name: Install cibuildwheel
run: uv pip install --system cibuildwheel==2.16.*
run: python -m pip install cibuildwheel==2.16.*

- name: Build wheels
run: cd hogql_parser && python -m cibuildwheel --output-dir dist
Expand Down
29 changes: 19 additions & 10 deletions .github/workflows/ci-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,20 @@ jobs:
cache-dependency-path: '**/requirements*.txt'
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}

# uv is a fast pip alternative: https://github.com/astral-sh/uv/
- run: pip install uv
- uses: syphar/restore-virtualenv@v1
id: cache-backend-tests
with:
custom_cache_key_element: v2-

- name: Install SAML (python3-saml) dependencies
run: |
sudo apt-get update
sudo apt-get install libxml2-dev libxmlsec1 libxmlsec1-dev libxmlsec1-openssl
- name: Install Python dependencies
if: steps.cache-backend-tests.outputs.cache-hit != 'true'
run: |
uv pip install --system -r requirements.txt -r requirements-dev.txt
python -m pip install -r requirements.txt -r requirements-dev.txt
- name: Check for syntax errors, import sort, and code style violations
run: |
Expand Down Expand Up @@ -189,17 +192,20 @@ jobs:
cache-dependency-path: '**/requirements*.txt'
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}

# uv is a fast pip alternative: https://github.com/astral-sh/uv/
- run: pip install uv
- uses: syphar/restore-virtualenv@v1
id: cache-backend-tests
with:
custom_cache_key_element: v1-

- name: Install SAML (python3-saml) dependencies
run: |
sudo apt-get update
sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
- name: Install python dependencies
if: steps.cache-backend-tests.outputs.cache-hit != 'true'
run: |
uv pip install --system -r requirements.txt -r requirements-dev.txt
python -m pip install -r requirements.txt -r requirements-dev.txt
- uses: actions/checkout@v3
with:
Expand All @@ -209,7 +215,7 @@ jobs:
run: |
# We need to ensure we have requirements for the master branch
# now also, so we can run migrations up to master.
uv pip install --system -r requirements.txt -r requirements-dev.txt
python -m pip install -r requirements.txt -r requirements-dev.txt
python manage.py migrate
- uses: actions/checkout@v3
Expand Down Expand Up @@ -338,18 +344,21 @@ jobs:
cache-dependency-path: '**/requirements*.txt'
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}

# uv is a fast pip alternative: https://github.com/astral-sh/uv/
- run: pip install uv
- uses: syphar/restore-virtualenv@v1
id: cache-backend-tests
with:
custom_cache_key_element: v2-

- name: Install SAML (python3-saml) dependencies
run: |
sudo apt-get update
sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
- name: Install python dependencies
if: steps.cache-backend-tests.outputs.cache-hit != 'true'
shell: bash
run: |
uv pip install --system -r requirements.txt -r requirements-dev.txt
python -m pip install -r requirements.txt -r requirements-dev.txt
- name: Add kafka host to /etc/hosts for kafka connectivity
run: sudo echo "127.0.0.1 kafka" | sudo tee -a /etc/hosts
Expand Down
25 changes: 16 additions & 9 deletions .github/workflows/ci-plugin-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,11 @@ jobs:
cache-dependency-path: '**/requirements*.txt'
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}

# uv is a fast pip alternative: https://github.com/astral-sh/uv/
- run: pip install uv
- uses: syphar/restore-virtualenv@v1
if: needs.changes.outputs.plugin-server == 'true'
id: cache-backend-tests
with:
custom_cache_key_element: v1-

- name: Install SAML (python3-saml) dependencies
if: needs.changes.outputs.plugin-server == 'true'
Expand All @@ -132,10 +135,10 @@ jobs:
sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
- name: Install python dependencies
if: needs.changes.outputs.plugin-server == 'true'
if: needs.changes.outputs.plugin-server == 'true' && steps.cache-backend-tests.outputs.cache-hit != 'true'
run: |
uv pip install --system -r requirements-dev.txt
uv pip install --system -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m pip install -r requirements.txt
- name: Install pnpm
if: needs.changes.outputs.plugin-server == 'true'
Expand Down Expand Up @@ -216,18 +219,22 @@ jobs:
cache-dependency-path: '**/requirements*.txt'
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}

# uv is a fast pip alternative: https://github.com/astral-sh/uv/
- run: pip install uv
- uses: syphar/restore-virtualenv@v1
id: cache-backend-tests
with:
custom_cache_key_element: v1-

- name: Install SAML (python3-saml) dependencies
run: |
sudo apt-get update
sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
if: steps.cache-backend-tests.outputs.cache-hit != 'true'

- name: Install python dependencies
if: steps.cache-backend-tests.outputs.cache-hit != 'true'
run: |
uv pip install --system -r requirements-dev.txt
uv pip install --system -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m pip install -r requirements.txt
- name: Install pnpm
uses: pnpm/action-setup@v2
Expand Down

0 comments on commit a788113

Please sign in to comment.