File tree Expand file tree Collapse file tree 4 files changed +48
-29
lines changed Expand file tree Collapse file tree 4 files changed +48
-29
lines changed Original file line number Diff line number Diff line change
1
+
2
+ name : dbt-sqlite
3
+
4
+ on : [push]
5
+
6
+ jobs :
7
+ build :
8
+
9
+ runs-on : ubuntu-latest
10
+ strategy :
11
+ matrix :
12
+ python-version : ["3.7", "3.8", "3.9"]
13
+
14
+ steps :
15
+ - uses : actions/checkout@v3
16
+ - name : Set up Python ${{ matrix.python-version }}
17
+ uses : actions/setup-python@v3
18
+ with :
19
+ python-version : ${{ matrix.python-version }}
20
+ - name : Install from requirements.txt
21
+ run : |
22
+ python -m pip install --upgrade pip
23
+ pip install pytest pytest-dotenv dbt-tests-adapter==1.1.0
24
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
25
+ - name : Create data directory and install crypto.so
26
+ run : |
27
+ mkdir -p /tmp/dbt-sqlite-tests
28
+ cd /tmp/dbt-sqlite-tests && wget https://github.com/nalgeon/sqlean/releases/download/0.12.2/crypto.so
29
+ - name : Run test script
30
+ run : |
31
+ ./run_tests.sh
Original file line number Diff line number Diff line change @@ -15,9 +15,4 @@ RUN pip install dbt-core~=1.1.0
15
15
16
16
RUN pip install pytest pytest-dotenv dbt-tests-adapter==1.1.0
17
17
18
- # dbt-sqlite overrides some stuff pertaining to 'docs generate'
19
- # so exercise it using jaffle_shop repo
20
-
21
- RUN cd /root && git clone https://github.com/dbt-labs/jaffle_shop.git
22
-
23
18
ENTRYPOINT ["./run_tests.sh" ]
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ echo " HOME=$HOME "
4
+
3
5
pip install -e .
4
6
5
7
# Leaving the database file between runs of pytest can mess up subsequent test runs.
@@ -12,15 +14,27 @@ python3 -m pytest tests/functional
12
14
# dbt-sqlite overrides some stuff pertaining to 'docs generate'
13
15
# so exercise it using jaffle_shop repo
14
16
15
- cd /root/jaffle_shop
17
+ # dbt-sqlite overrides some stuff pertaining to 'docs generate'
18
+ # so exercise it using jaffle_shop repo
19
+
20
+ cd $HOME
21
+
22
+ git clone https://github.com/dbt-labs/jaffle_shop.git
23
+
24
+ cd jaffle_shop
16
25
17
26
git pull
18
27
19
28
mkdir -p /tmp/jaffle_shop
20
29
21
- mkdir -p /root/.dbt
30
+ mkdir -p $HOME /.dbt
31
+
32
+ if [ -f $HOME /.dbt/profiles.yml ]; then
33
+ echo " ERROR: profiles.yml already exists, refusing to overwrite it"
34
+ exit 1
35
+ fi
22
36
23
- cat >> /root /.dbt/profiles.yml << EOF
37
+ cat >> $HOME /.dbt/profiles.yml << EOF
24
38
25
39
jaffle_shop:
26
40
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments