@@ -44,20 +44,25 @@ jobs:
4444 run : poetry run tox -e flake8
4545
4646 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 }}
4949 env :
5050 REPORTS_ARTIFACT : tests-reports
5151 strategy :
5252 fail-fast : false
5353 matrix :
54+ os : [ubuntu-latest, windows-latest, macos-latest]
5455 python-version :
5556 - " 3.9" # highest supported
5657 - " 3.8"
5758 - " 3.7"
5859 - " 3.6" # lowest supported
5960 timeout-minutes : 30
6061 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
6166 - name : Checkout
6267 # see https://github.com/actions/checkout
6368 uses : actions/checkout@v2
6974 with :
7075 python-version : ${{ matrix.python-version }}
7176 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
7279 - name : Install poetry
7380 # see https://github.com/marketplace/actions/setup-poetry
7481 uses : Gr1N/setup-poetry@v7
7784 - uses : actions/cache@v2
7885 with :
7986 path : ~/.cache/pypoetry/virtualenvs
80- key : ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
87+ key : ${{ runner.os }}}-${{ matrix.python-version }} -poetry-${{ hashFiles('poetry.lock') }}
8188 - name : Install dependencies
8289 run : poetry install
8390 - name : Ensure build successful
8794 - name : Generate coverage reports
8895 run : >
8996 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 &&
9198 poetry run coverage html -d ${{ env.REPORTS_DIR }}
9299 - name : Artifact reports
93100 if : ${{ ! cancelled() }}
0 commit comments