Skip to content

Commit

Permalink
Revert "chore(CI): revert "chore: syphar is deprecated. fangle python…
Browse files Browse the repository at this point in the history
… actions…"

This reverts commit 1f2ff4a.
  • Loading branch information
pauldambra authored Apr 8, 2024
1 parent 487fb61 commit 0f9c815
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 42 deletions.
11 changes: 5 additions & 6 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 }}

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

- name: Install SAML (python3-saml) dependencies
shell: bash
Expand All @@ -69,13 +69,12 @@ 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: |
python -m pip install -r requirements-dev.txt
python -m pip install -r requirements.txt
uv pip install --system -r requirements-dev.txt
uv pip install --system -r requirements.txt
- name: Install asv
run: python -m pip install asv==0.5.1 virtualenv
run: uv pip install --system asv==0.5.1 virtualenv

- name: Set up PostHog
run: |
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/build-hogql-parser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,11 @@ 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: python -m pip install cibuildwheel==2.16.*
run: uv pip install --system cibuildwheel==2.16.*

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

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

- 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: |
python -m pip install -r requirements.txt -r requirements-dev.txt
uv pip install --system -r requirements.txt -r requirements-dev.txt
- name: Check for syntax errors, import sort, and code style violations
run: |
Expand Down Expand Up @@ -192,20 +189,17 @@ jobs:
cache-dependency-path: '**/requirements*.txt'
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}

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

- 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: |
python -m pip install -r requirements.txt -r requirements-dev.txt
uv pip install --system -r requirements.txt -r requirements-dev.txt
- uses: actions/checkout@v3
with:
Expand All @@ -215,7 +209,7 @@ jobs:
run: |
# We need to ensure we have requirements for the master branch
# now also, so we can run migrations up to master.
python -m pip install -r requirements.txt -r requirements-dev.txt
uv pip install --system -r requirements.txt -r requirements-dev.txt
python manage.py migrate
- uses: actions/checkout@v3
Expand Down Expand Up @@ -344,21 +338,18 @@ jobs:
cache-dependency-path: '**/requirements*.txt'
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}

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

- 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: |
python -m pip install -r requirements.txt -r requirements-dev.txt
uv pip install --system -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: 9 additions & 16 deletions .github/workflows/ci-plugin-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,8 @@ jobs:
cache-dependency-path: '**/requirements*.txt'
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}

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

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

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

- 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: |
python -m pip install -r requirements-dev.txt
python -m pip install -r requirements.txt
uv pip install --system -r requirements-dev.txt
uv pip install --system -r requirements.txt
- name: Install pnpm
uses: pnpm/action-setup@v2
Expand Down

0 comments on commit 0f9c815

Please sign in to comment.