fix function call which can't embed in f-format string #73
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 scripts/*.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" | |
install-modules-with: cpanm | |
install-modules: Readonly File::Basename File::Slurp IPC::Run | |
- name: Run black box tests | |
run: | | |
prove test/cli-test-python.t |