Skip to content

Commit

Permalink
add new lint ci job
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmmcneill committed Jul 23, 2022
1 parent 495f68d commit f712657
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ defaults:
working-directory: integration_tests
on: [push]
jobs:
build:
test:
runs-on: ubuntu-latest
name: Build
name: Test
services:
postgres:
image: postgres:14.0-alpine
Expand All @@ -28,10 +28,26 @@ jobs:
- name: Setup python venv
uses: syphar/restore-virtualenv@v1
- name: Install dbt
run: pip install -r requirements.txt
run: pip install -r requirements-test.txt
- name: Run dbt deps
run: dbt deps
- name: Run dbt seed
run: dbt seed --profiles-dir ci_profiles
- name: Run dbt models & tests
run: dbt build -s dbt_graph_theory_integration_tests --profiles-dir ci_profiles
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Setup python venv
uses: syphar/restore-virtualenv@v1
- name: Install sqlfluff
run: pip install -r requirements-test.txt
- name: Run sqlfluff
run: sqlfluff lint
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ To set up a python3 virtual environment, run the following in order from the `in
```
python3 -m venv ci_venv
source ci_venv/bin/activate
pip install -r requirements.txt
pip install -r requirements-test.txt
pip install -r requirements-lint.txt
```

To exit the virtual environment, simply run:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
dbt-postgres==1.1.1
sqlfluff==1.2.1
sqlfluff-templater-dbt==1.2.1
1 change: 1 addition & 0 deletions integration_tests/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dbt-postgres==1.1.1

0 comments on commit f712657

Please sign in to comment.