Skip to content

Update python-compatibility.yml #3

Update python-compatibility.yml

Update python-compatibility.yml #3

name: Python Compatibility Check
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test with your package
run: |
pytest --cov=./pycgapi --cov-report=xml
continue-on-error: true
- name: Compatibility Result
if: ${{ always() }}
run: |
if [ ${{ job.status }} == 'success' ]; then
echo "Python ${{ matrix.python-version }}: Compatible"
else
echo "Python ${{ matrix.python-version }}: Incompatible"
fi