-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (51 loc) · 1.7 KB
/
build-test-deploy.yml
File metadata and controls
51 lines (51 loc) · 1.7 KB
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
name: 'Build, Test, & Deploy a CookieCutter Template for a Python Package'
on:
push:
workflow_dispatch:
jobs:
build_test_deploy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.6", "3.7"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python-version }}"
- name: Install CookieCutter
run: |
python -m pip install -U "$(cat requirements.txt | grep 'cookiecutter')"
- name: Render and Enter CookieCutter Template
run: |
python -m cookiecutter --no-input .
- name: Install Tox
run: |
cd pyspark-cloud
python -m pip install -U "$(cat requirements-dev.txt | grep '^tox$')"
python -m pip install -U "$(cat requirements-dev.txt | grep '^tox-gh-actions$')"
- name: Run Tests with Tox
run: |
cd pyspark-cloud
python -m tox
- name: Install Coverage
run: |
cd pyspark-cloud
python -m pip install -U "$(cat requirements-dev.txt | grep '^coverage$')"
- name: Make Coverage Reports
run: |
cd pyspark-cloud
python -m coverage combine
python -m coverage xml -i -o coverage/covreport-${{ matrix.python-version }}.xml
- name: Upload PyTest XML Results
uses: actions/upload-artifact@v2
with:
name: pytest-results
path: pyspark-cloud/junit/test-results-*.xml
if:
- name: Upload Coverage XML Results
uses: actions/upload-artifact@v2
with:
name: coverage-results
path: pyspark-cloud/coverage/covreport-*.xml
if: ${{ always() }}