-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (57 loc) · 2.11 KB
/
build.yaml
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
name: Kedro-Dolt Tests
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 20 * * *' # run at noon PT
env:
package_name: 'kedro_dolt'
cov_version: '3.8'
jobs:
# Run test suite across all major OS types
build:
strategy:
matrix:
python-version: ['3.6', '3.8']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo curl -L https://github.com/liquidata-inc/dolt/releases/latest/download/install.sh | sudo bash
dolt config --global --add user.email bojack@horseman.com
dolt config --global --add user.name "Bojack Horseman"
dolt config --global --add metrics.host eventsapi.awsdev.ld-corp.com
dolt config --global --add metrics.port 443
- uses: Gr1N/setup-poetry@v4
- uses: actions/cache@v1
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-poetry-
- name: Install poetry dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Formatting
run: poetry run make fmt
- name: Linting
run: poetry run make lint
- name: Execute pytest
run: |
poetry run pytest . --cov=${{ env.package_name }} --cov-report=term --cov-report xml
- uses: codecov/codecov-action@v1
if: ${{ matrix.python-version }} == $${{ env.cov_version }}
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
#files: ./coverage-${{ runner.os }}-${{ matrix.python-version }}.xml
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)