@@ -23,12 +23,14 @@ jobs:
2323 matrix :
2424 platform : [ubuntu-latest, macos-latest]
2525 python-version : ["3.6", "3.7", "3.8", "3.9", "3.10"]
26+
2627 steps :
2728 - uses : actions/checkout@v3
2829 - name : Set up Python ${{ matrix.python-version }}
2930 uses : actions/setup-python@v2
3031 with :
3132 python-version : ${{ matrix.python-version }}
33+
3234 - name : Install dependencies
3335 run : |
3436 python -m pip install --upgrade pip
@@ -45,25 +47,49 @@ jobs:
4547 - name : Specify current package version to assist build tool
4648 run : |
4749 PARSER="src/cookiecutter_python/{{ cookiecutter.project_slug }}/scripts/parse_version.py"
48- A =$(python "${PARSER}")
49- echo $A
50- echo "PKG_VERSION=$A " >> $GITHUB_ENV
50+ PARSED_VERSION =$(python "${PARSER}")
51+ echo $PARSED_VERSION
52+ echo "PKG_VERSION=$PARSED_VERSION " >> $GITHUB_ENV
5153
5254 - name : Run Test Suite
53- run : tox -vv -s false -- --run-network_bound
55+ run : tox --sitepackages - vv -s false -- -n auto --run-network_bound
5456 env :
5557 PLATFORM : ${{ matrix.platform }}
5658
5759 - name : Check for compliance with Python Best Practices
5860 run : |
5961 DIST_DIR=dist
6062 echo "DIST_DIR=dist" >> $GITHUB_ENV
61-
62- mkdir "$ DIST_DIR"
63+ ls -l ./
64+ mkdir ${ DIST_DIR}
6365 mv ".tox/${DIST_DIR}/cookiecutter_python-${PKG_VERSION}.tar.gz" "${DIST_DIR}"
6466 mv ".tox/${DIST_DIR}/cookiecutter_python-${PKG_VERSION}-py3-none-any.whl" "${DIST_DIR}"
6567 tox -e check -vv -s false
6668
69+ - name : Aggregate Test Coverage Data
70+ run : tox -e coverage --sitepackages -vv -s false
71+
72+ - run : pip install coverage[toml]>=5.1
73+
74+ - name : Send Coverage Data to Codecov
75+ uses : codecov/codecov-action@v2
76+ with :
77+ directory : ./.tox
78+ env_vars : OS,PYTHON
79+ fail_ci_if_error : true
80+ files : ./.tox/coverage.xml
81+ flags : unittests
82+ name : codecov-umbrella
83+ verbose : true
84+
85+ - name : Install documentation test dependencies
86+ if : ${{ matrix.platform == 'macos-latest' && matrix.python-version != '3.6' }}
87+ run : brew install enchant
88+
89+ - name : Run Documentation Tests
90+ if : ${{ matrix.platform == 'ubuntu-latest' || matrix.python-version != '3.6' }}
91+ run : tox -e docs --sitepackages -vv -s false
92+
6793 - name : Upload Source & Wheel distributions as Artefacts
6894 uses : actions/upload-artifact@v2
6995 with :
@@ -72,33 +98,14 @@ jobs:
7298 path : ${{ env.DIST_DIR }}
7399 if-no-files-found : error
74100
75- - name : Aggregate Test Coverage Data
76- run : |
77- python -m pip install coverage
78- tox -e coverage --sitepackages -vv -s false
79-
80101 - name : Upload Coverage Data as Artefacts
81102 uses : actions/upload-artifact@v2
82103 with :
83104 name : coverage-xml-data
84105 path : ./.tox/coverage.xml
85106 if-no-files-found : error
86107
87- host_coverage_results :
88- needs : test_suite
89- runs-on : ubuntu-latest
90- steps :
91- - name : Download Coverage Data
92- uses : actions/download-artifact@v2
93- with :
94- name : coverage-xml-data
95- - name : Send Coverage Data to Codecov
96- uses : codecov/codecov-action@v2
97- with :
98- directory : .
99- env_vars : OS,PYTHON
100- fail_ci_if_error : true
101- files : coverage.xml
102- flags : unittests
103- name : codecov-umbrella
104- verbose : true
108+ # - name: Download Coverage Data
109+ # uses: actions/download-artifact@v2
110+ # with:
111+ # name: coverage-xml-data
0 commit comments