Skip to content

Merge branch 'master' of https://github.com/AuthorizeNet/sdk-python #10

Merge branch 'master' of https://github.com/AuthorizeNet/sdk-python

Merge branch 'master' of https://github.com/AuthorizeNet/sdk-python #10

name: Authorize.net Python CI
on:
push:
pull_request:
workflow_dispatch:
env:
sdk_python: 'sdk-python'
sample_code_python: 'sample-code-python'
jobs:
workflow-job:
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest, windows-latest]
pyth-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
include:
- operating-system: ubuntu-20.04 # Checking support for ubuntu os with python 3.6
pyth-version: '3.6'
- operating-system: macos-13 # Checking support for mac os with python 3.6
pyth-version: '3.6'
- operating-system: macos-13 # Checking support for mac os with python 3.7
pyth-version: '3.7'
exclude:
- operating-system: ubuntu-latest #arm 64 doesn't support python ver 3.7
pyth-version: '3.6'
- operating-system: macos-latest #arm 64 doesn't support python ver 3.6
pyth-version: '3.6'
- operating-system: macos-latest #arm 64 doesn't support python ver 3.7
pyth-version: '3.7'
runs-on: ${{matrix.operating-system}}
steps:
- name: Creating separate folders for SDK and Sample Codes
run: |
rm -rf $sdk_python
rm -rf $sample_code_python
mkdir $sdk_python $sample_code_python
- name: Checkout authorizenet/sdk-python
uses: actions/checkout@v4
with:
path: ${{env.sdk_python}}
- name: Checkout authorizenet/sample-code-python
uses: actions/checkout@v4
with:
repository: 'authorizenet/sample-code-python'
ref: 'master'
path: ${{env.sample_code_python}}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{matrix.pyth-version}}
- name: Install and Test
run: |
python -V
python -m pip install --upgrade pip
python -m venv virtual_env
if [[ "$(uname -s)" == "Linux" ]]; then
echo "OS: Linux"
source virtual_env/bin/activate
elif [[ "$(uname -s)" == "Darwin" ]]; then
echo "OS: MacOS"
source virtual_env/bin/activate
else
echo "OS: Windows"
source virtual_env/Scripts/activate
fi
echo $VIRTUAL_ENV
cd $sdk_python
pip install -e .
cd ../$sample_code_python
python ./test-runner.py