Skip to content

Prepare tests for Salesforce API 62.0 Winter '25 #52

Prepare tests for Salesforce API 62.0 Winter '25

Prepare tests for Salesforce API 62.0 Winter '25 #52

Workflow file for this run

name: django-salesforce test
on:
push:
branches: [ 'actions*', main ]
# pull_request:
# branches: [ main ]
# # prefer to teminate some queued jobs only manually, "max-parallel: 1" works enough
# concurrency:
# group: one-job-at-a-time
# cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
python-version: [3.8, 3.12, 3.11, "3.10", 3.9]
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies, Customize local_settings
run: |
python${{ matrix.python-version }} -V
pip install --upgrade pip
pip install tox
# this should be used only for a capitalized primary key 'Id' with migrations
# sed -i -e "s/'id', salesforce/'Id', salesforce/" salesforce/testrunner/example/migrations/0*.py
- name: Run Tests
env:
DJSF_LICENSE_KEY: ${{ secrets.DJSF_LICENSE_KEY }}
SF_CONSUMER_KEY: ${{ secrets.SF_CONSUMER_KEY }}
SF_CONSUMER_SECRET: ${{ secrets.SF_CONSUMER_SECRET }}
SF_USER: ${{ secrets.SF_USER }}
SF_PASSWORD: ${{ secrets.SF_PASSWORD }}
SF_HOST: ${{ secrets.SF_HOST }}
TOXENV_38: "docs_style,typing,clean,dj22-py38,dj21-py38"
TOXENV_312: "dj51-py312"
TOXENV_311: "dj50-py311,dj42-py311"
TOXENV_310: "dj40-py310"
TOXENV_39: "no_django-py39,debug_toolbar-dj42-py39,dj32-py39,dj30-py39"
run: |
TOXENV_NAME=$(echo TOXENV_${{ matrix.python-version }} | sed 's/\.//')
cat > salesforce/testrunner/local_settings.py <<'-- end local_settings --'
SF_PK = 'Id'
SF_LAZY_CONNECT = False
-- end local_settings --
echo "tox -e ${!TOXENV_NAME}"
tox -e ${!TOXENV_NAME} --colored yes