Skip to content

add setup for black box tests of Python implementation #67

add setup for black box tests of Python implementation

add setup for black box tests of Python implementation #67

Workflow file for this run

---
name: Python
# yamllint disable rule:line-length
on: # yamllint disable-line rule:truthy
push:
paths: ['src/python/**', '.github/workflows/test-python.yml']
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: false
matrix:
# runner: [ubuntu-latest, macos-latest, windows-latest]
runner: [ubuntu-latest, macos-latest]
python-version: ['3.10', '3.11', '3.12']
exclude:
- {python-version: "3.10", runner: "macos-latest"}
include:
- {python-version: "3.10", runner: "macos-13"}
runs-on: ${{matrix.runner}}
name: OS ${{matrix.runner}} Python ${{matrix.python-version}}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python-version}}
architecture: x64
cache: 'pip'
- name: Set Python path on Windows
if: ${{ startsWith( matrix.runner, 'windows-') }}
run: echo "PYTHONPATH=$GITHUB_WORKSPACE\src\python" >> $GITHUB_ENV
- name: Set Python path on Linux & MacOS
if: ${{ startsWith( matrix.runner, 'ubuntu-') || startsWith( matrix.runner, 'macos-') }}
run: echo "PYTHONPATH=$GITHUB_WORKSPACE/src/python" >> $GITHUB_ENV
- name: Install dependencies
working-directory: src/python
run: |
echo "directory: $(pwd)"
python -VV
python -m site
pip install -r requirements.txt
- name: Run flake8
working-directory: src/python
run: |
flake8 timezone_solar/*.py timezone_solar/tests/*.py
- name: Run tests
working-directory: src/python
run: |
pip install -e .
python timezone_solar/tests
- name: Set up for black box tests
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: "5.38"
- name: Run black box tests
run: |
prove test/cli-test-python.t