forked from nathanwoodburn/firewalletbrowser
feat: Add testing CI workflow
This commit is contained in:
40
.gitea/workflows/test.yml
Normal file
40
.gitea/workflows/test.yml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
name: Test Python Compatibility
|
||||||
|
run-name: Test Python Compatibility
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Python-Compatibility:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
if [ -f requirements.txt ]; then
|
||||||
|
pip install -r requirements.txt
|
||||||
|
fi
|
||||||
|
pip install pytest
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
echo "Testing with Python ${{ matrix.python-version }}"
|
||||||
|
python -m pytest main.py
|
||||||
|
|
||||||
|
- name: Check compatibility
|
||||||
|
run: |
|
||||||
|
# Add any additional compatibility checks if needed
|
||||||
|
python --version
|
||||||
|
python -c "import sys; print(f'Python {sys.version_info.major}.{sys.version_info.minor} compatibility test passed')"
|
||||||
Reference in New Issue
Block a user