-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (61 loc) · 2.12 KB
/
test-python.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
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', '3.13.0-beta.2']
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 File::Slurp
- name: Run black box tests
run: |
prove test/cli-test-python.t