Skip to content

Enhance GitHub workflows with improved naming and structure, add rele… #2

Enhance GitHub workflows with improved naming and structure, add rele…

Enhance GitHub workflows with improved naming and structure, add rele… #2

name: Integration Tests 🧪
on:
pull_request_review:
types: [submitted]
workflow_call:
secrets:
CUMULUSCI_SERVICE_github:
required: true
CCITEST_APP_KEY:
required: true
workflow_dispatch:
env:
CUMULUSCI_KEY: ${{ secrets.CUMULUSCI_KEY }}
CUMULUSCI_SERVICE_github: ${{ secrets.CUMULUSCI_SERVICE_github }}
GITHUB_APP_ID: 129383
GITHUB_APP_KEY: ${{ secrets.CCITEST_APP_KEY }}
jobs:
org_backed_tests:
name: 🏢 Org-connected Tests
runs-on: ${{ github.repository_owner == 'SFDO-Tooling' && 'SFDO-Tooling-Ubuntu' || 'ubuntu-latest' }}
steps:
- name: 📦 Checkout Code
uses: actions/checkout@v2
- name: 🐍 Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: pip
cache-dependency-path: "requirements/*.txt"
- name: 📥 Install Python dependencies
run: |
echo "Installing dependencies..."
python -m pip install -U pip
pip install -r requirements_dev.txt
- name: ⚙️ Install sfdx
run: |
echo "Installing Salesforce CLI..."
mkdir sfdx
wget -qO- https://developer.salesforce.com/media/salesforce-cli/sfdx/channels/stable/sfdx-linux-x64.tar.xz | tar xJ -C sfdx --strip-components 1
echo $(realpath sfdx/bin) >> $GITHUB_PATH
- name: 🔐 Authenticate Dev Hub
run: |
echo "Authenticating Dev Hub..."
sfdx plugins --core
echo $SFDX_HUB_KEY_BASE64 | base64 --decode > sfdx.key
sfdx auth:jwt:grant --clientid $SFDX_CLIENT_ID --jwtkeyfile sfdx.key --username $SFDX_HUB_USERNAME --setdefaultdevhubusername -a hub
env:
SFDX_HUB_KEY_BASE64: ${{ secrets.SFDX_HUB_KEY_BASE64 }}
SFDX_CLIENT_ID: ${{ secrets.SFDX_CLIENT_ID }}
SFDX_HUB_USERNAME: ${{ secrets.SFDX_HUB_USERNAME }}
- name: 📼 Re-make VCR tapes (transiently)
run: make vcr
- name: 🧹 Delete scratch org
if: always()
run: |
echo "Deleting scratch org..."
cci org scratch_delete pytest
robot_ui:
name: 🤖 Robot Tests: ${{ matrix.job-name }}

Check failure on line 64 in .github/workflows/slow_integration_tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/slow_integration_tests.yml

Invalid workflow file

You have an error in your yaml syntax on line 64
runs-on: ${{ github.repository_owner == 'SFDO-Tooling' && 'SFDO-Tooling-Ubuntu' || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
include:
- browser: "BROWSER:headlesschrome"
job-name: "Chrome"
org-shape: "dev"
# - browser: "BROWSER:headlessfirefox"
# job-name: "Firefox"
# org-shape: "dev"
# - browser: "BROWSER:headlesschrome"
# job-name: "Pre-release"
# org-shape: "prerelease"
steps:
- name: 📦 Checkout Code
uses: actions/checkout@v2
- name: 🐍 Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: pip
cache-dependency-path: "requirements/*.txt"
- name: 📥 Install Python dependencies
run: |
echo "Installing dependencies..."
pip install -r requirements_dev.txt
- name: ⚙️ Install sfdx
run: |
echo "Installing Salesforce CLI..."
mkdir sfdx
wget -qO- https://developer.salesforce.com/media/salesforce-cli/sf-linux-x64.tar.xz | tar xJ -C sfdx --strip-components 1
echo $(realpath sfdx/bin) >> $GITHUB_PATH
- name: 🖥️ Initialize Browser/Playwright
run: |
echo "Initializing Playwright..."
cci robot install_playwright
- name: 🔐 Authenticate Dev Hub
run: |
echo "Authenticating Dev Hub..."
sfdx plugins --core
echo $SFDX_HUB_KEY_BASE64 | base64 --decode > sfdx.key
sf org login jwt --client-id $SFDX_CLIENT_ID --jwt-key-file sfdx.key --username $SFDX_HUB_USERNAME --setdefaultdevhubusername -a hub
env:
SFDX_HUB_KEY_BASE64: ${{ secrets.SFDX_HUB_KEY_BASE64 }}
SFDX_CLIENT_ID: ${{ secrets.SFDX_CLIENT_ID }}
SFDX_HUB_USERNAME: ${{ secrets.SFDX_HUB_USERNAME }}
- name: 🏃 Run robot tests
run: |
echo "Running robot tests..."
coverage run --append $(which cci) task run robot \
--org ${{ matrix.org-shape }} \
-o suites cumulusci/robotframework/tests/salesforce \
-o exclude no-browser \
-o vars ${{ matrix.browser }}
- name: 🧹 Delete scratch org
if: always()
run: |
echo "Deleting scratch org..."
cci org scratch_delete ${{ matrix.org-shape }}
- name: 📤 Store robot results
if: failure()
uses: actions/upload-artifact@v4
with:
name: robot
path: robot/CumulusCI/results