Skip to content

Commit 3cd7774

Browse files
committed
Add automated CI to run black checker
1 parent 61c7eda commit 3cd7774

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

.github/workflows/ci.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: snowflake_timetravel_table Black Checker
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches:
8+
- '**'
9+
10+
jobs:
11+
check_black:
12+
name: Check Black
13+
runs-on: ubuntu-20.04
14+
steps:
15+
- uses: actions/checkout@v1
16+
- name: Setup Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: 3.8
20+
- name: Install Tox
21+
run: pip install tox
22+
- name: Run Black
23+
run: tox -e black

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@
1515
test:
1616
tox
1717

18+
check-black:
19+
tox -e black
20+
1821
black:
1922
black --line-length 120 integration_tests/tests

tox.ini

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[tox]
22
# use skipsdist=True to avoid needing a setup.py, since the thing we are testing is NOT a python package.
33
skipsdist = True
4-
envlist = py38-dbt{018,019}-int, py38-black
4+
envlist = py38-dbt{018,019}-int
55

66
[pytest]
77
testpaths =
88
integration_tests/tests
99

10-
[testenv:py38-dbt{018,019}-int]
10+
[testenv]
1111
setenv =
1212
DISPLAY={env:DISPLAY:}
1313
SNOWFLAKE_TEST_ACCOUNT={env:SNOWFLAKE_TEST_ACCOUNT:}
@@ -31,6 +31,6 @@ commands =
3131
dbt run --project-dir integration_tests/run_project --profiles-dir '../test_profile'
3232
pytest {posargs}
3333

34-
[testenv:py38-black]
34+
[testenv:black]
3535
deps = black
3636
commands = black --line-length 120 --check --diff integration_tests/tests

0 commit comments

Comments
 (0)