Skip to content

Commit

Permalink
chore: Even less BuildJet (#17249)
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes authored Aug 30, 2023
1 parent 0e13727 commit 6b40fee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
11 changes: 9 additions & 2 deletions .github/actions/run-backend-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,23 @@ runs:
with:
python-version: ${{ inputs.python-version }}
token: ${{ inputs.token }}
cache: pip

- name: Install SAML (python3-saml) dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
if: steps.python.outputs.cache-hit != 'true'
- uses: syphar/restore-virtualenv@v1
id: cache-backend-tests
with:
custom_cache_key_element: v1

- uses: syphar/restore-pip-download-cache@v1
if: steps.cache-backend-tests.outputs.cache-hit != 'true'

- name: Install python dependencies
if: steps.cache-backend-tests.outputs.cache-hit != 'true'
shell: bash
run: |
python -m pip install -r requirements-dev.txt
Expand Down
20 changes: 5 additions & 15 deletions .github/workflows/ci-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
timeout-minutes: 30

name: Python code quality checks
runs-on: buildjet-2vcpu-ubuntu-2204
runs-on: ubuntu-latest

steps:
# If this run wasn't initiated by the bot (meaning: snapshot update) and we've determined
Expand All @@ -101,17 +101,15 @@ jobs:
path: 'current/'

- name: Set up Python
id: python
uses: actions/setup-python@v4
with:
python-version: 3.10.10
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}
cache: pip

- uses: syphar/restore-virtualenv@v1
id: cache-async-migrations-tests
id: cache-backend-tests
with:
custom_cache_key_element: v1-${{ inputs.cache-id }}
custom_cache_key_element: v1-

- uses: syphar/restore-pip-download-cache@v1
if: steps.cache-backend-tests.outputs.cache-hit != 'true'
Expand All @@ -120,7 +118,6 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
if: steps.python.outputs.cache-hit != 'true'
- name: Install python dependencies
if: steps.cache-backend-tests.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -154,8 +151,7 @@ jobs:
# "apt-get install antlr" would install 4.7 which is incompatible with our grammar.
export ANTLR_VERSION=4.13.0
# java version doesn't matter
sudo apt update -y
sudo apt-get -y install default-jre
sudo apt-get install default-jre
mkdir antlr
cd antlr
curl -o antlr.jar https://www.antlr.org/download/antlr-$ANTLR_VERSION-complete.jar
Expand Down Expand Up @@ -187,12 +183,10 @@ jobs:
docker compose -f docker-compose.dev.yml up -d
- name: Set up Python
id: python
uses: buildjet/setup-python@v4
uses: actions/setup-python@v4
with:
python-version: 3.10.10
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}
cache: pip

- uses: syphar/restore-virtualenv@v1
id: cache-backend-tests
Expand All @@ -206,7 +200,6 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
if: steps.python.outputs.cache-hit != 'true'
- name: Install python dependencies
if: steps.cache-backend-tests.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -334,12 +327,10 @@ jobs:
docker compose -f docker-compose.dev.yml up -d
- name: Set up Python
id: python
uses: actions/setup-python@v4
with:
python-version: 3.10.10
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}
cache: pip

- uses: syphar/restore-virtualenv@v1
id: cache-backend-tests
Expand All @@ -353,7 +344,6 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
if: steps.python.outputs.cache-hit != 'true'
- name: Install python dependencies
if: steps.cache-backend-tests.outputs.cache-hit != 'true'
Expand Down

0 comments on commit 6b40fee

Please sign in to comment.