@@ -44,20 +44,25 @@ jobs:
44
44
run : poetry run tox -e flake8
45
45
46
46
build-and-test :
47
- name : Build & Test ( Python ${{ matrix.python-version }}
48
- runs-on : ubuntu-latest
47
+ name : Build & Test Python ${{ matrix.python-version }} on ${{ matrix.os }}
48
+ runs-on : ${{ matrix.os }}
49
49
env :
50
50
REPORTS_ARTIFACT : tests-reports
51
51
strategy :
52
52
fail-fast : false
53
53
matrix :
54
+ os : [ubuntu-latest, windows-latest, macos-latest]
54
55
python-version :
55
56
- " 3.9" # highest supported
56
57
- " 3.8"
57
58
- " 3.7"
58
59
- " 3.6" # lowest supported
59
60
timeout-minutes : 30
60
61
steps :
62
+ - name : Disabled Git auto EOL CRLF transforms
63
+ run : |
64
+ git config --global core.autocrlf false
65
+ git config --global core.eol lf
61
66
- name : Checkout
62
67
# see https://github.com/actions/checkout
63
68
uses : actions/checkout@v2
69
74
with :
70
75
python-version : ${{ matrix.python-version }}
71
76
architecture : ' x64'
77
+ - name : Validate Python Environment
78
+ run : echo "import sys; print('Python %s on %s in %s' % (sys.version, sys.platform, sys.getdefaultencoding()))" | python
72
79
- name : Install poetry
73
80
# see https://github.com/marketplace/actions/setup-poetry
74
81
uses : Gr1N/setup-poetry@v7
77
84
- uses : actions/cache@v2
78
85
with :
79
86
path : ~/.cache/pypoetry/virtualenvs
80
- key : ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
87
+ key : ${{ runner.os }}}-${{ matrix.python-version }} -poetry-${{ hashFiles('poetry.lock') }}
81
88
- name : Install dependencies
82
89
run : poetry install
83
90
- name : Ensure build successful
87
94
- name : Generate coverage reports
88
95
run : >
89
96
poetry run coverage report &&
90
- poetry run coverage xml -o ${{ env.REPORTS_DIR }}/coverage.xml &&
97
+ poetry run coverage xml -o ${{ env.REPORTS_DIR }}/coverage-${{ matrix.os }}-${{ matrix.python-version }} .xml &&
91
98
poetry run coverage html -d ${{ env.REPORTS_DIR }}
92
99
- name : Artifact reports
93
100
if : ${{ ! cancelled() }}
0 commit comments