Skip to content

Commit

Permalink
try to fix CI (#4)
Browse files Browse the repository at this point in the history
* try to fix CI

* fix syntax error

* specify SALESFORCE_DOMAIN for CI

* try to fix
  • Loading branch information
davisagli authored Oct 25, 2023
1 parent 555c995 commit c9befad
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 7 deletions.
44 changes: 39 additions & 5 deletions .github/workflows/plone-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
SALESFORCE_USERNAME: [email protected]
SALESFORCE_PASSWORD: bogus
SALESFORCE_TOKEN: bogus
SALESFORCE_DOMAIN: login

jobs:
build:
Expand All @@ -23,10 +24,6 @@ jobs:
include:
- python-version: 3.9
plone-version: 52
- python-version: 2.7
plone-version: 52
- python-version: 2.7
plone-version: 51
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
Expand All @@ -35,7 +32,7 @@ jobs:
~/.cache/pip
~/buildout-cache
~/extends
key: ${{ runner.os }}-deps-cache-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/*.cfg') }} }}
key: ${{ runner.os }}-deps-cache-${{ hashFiles('setup.py') }}-${{ hashFiles('*.cfg') }} }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
Expand All @@ -55,3 +52,40 @@ jobs:
run: buildout -c test_plone${{ matrix.plone-version }}.cfg
- name: Run tests
run: bin/test

build-py27:
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
strategy:
fail-fast: false
matrix:
include:
- python-version: 2.7
plone-version: 52
- python-version: 2.7
plone-version: 51
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cache/pip
~/buildout-cache
~/extends
key: ${{ runner.os }}-deps-cache-${{ hashFiles('setup.py') }}-${{ hashFiles('*.cfg') }} }}
- name: Install system libraries
run: apt-get install libxml2-dev libxslt1-dev libjpeg-dev
- name: setup buildout cache
run: |
mkdir -p ~/buildout-cache/{eggs,downloads}
mkdir ~/.buildout
echo "[buildout]" > $HOME/.buildout/default.cfg
echo "download-cache = $HOME/buildout-cache/downloads" >> $HOME/.buildout/default.cfg
echo "eggs-directory = $HOME/buildout-cache/eggs" >> $HOME/.buildout/default.cfg
- name: Install pip and zc.buildout
run: python -m pip install --upgrade pip wheel zc.buildout setuptools -c constraints_plone${{ matrix.plone-version }}.txt
- name: Run buildout
run: buildout -c test_plone${{ matrix.plone-version }}.cfg
- name: Run tests
run: bin/test
4 changes: 2 additions & 2 deletions src/jazkarta/easyformplugin/salesforce/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def setUpPloneSite(self, portal):
def scrub_login_request(request):
if request.body is not None:
request.body = re.sub(
rb"<n1:(username|password)>.*?</n1:\1>",
br"<n1:(username|password)>.*?</n1:\1>",
lambda m: b"<n1:" + m.group(1) + b">REDACTED</n1:" + m.group(1) + b">",
request.body,
)
Expand All @@ -66,7 +66,7 @@ def scrub_login_request(request):

def scrub_login_response(response):
response["body"]["string"] = re.sub(
rb"<sessionId>.*?</sessionId>",
br"<sessionId>.*?</sessionId>",
b"<sessionId>FAKE_SESSION</sessionId>",
response["body"]["string"],
)
Expand Down

0 comments on commit c9befad

Please sign in to comment.