Skip to content

Commit 81699db

Browse files
Hello World
0 parents  commit 81699db

File tree

74 files changed

+4638
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+4638
-0
lines changed

.github/workflows/test.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
services:
14+
postgres:
15+
image: postgres:15
16+
env:
17+
POSTGRES_USER: postgres
18+
POSTGRES_PASSWORD: testpassword
19+
POSTGRES_DB: testdb
20+
ports:
21+
- 5432:5432
22+
options: >-
23+
--health-cmd pg_isready
24+
--health-interval 10s
25+
--health-timeout 5s
26+
--health-retries 5
27+
28+
steps:
29+
- uses: actions/checkout@v3
30+
31+
- name: Set up Python 3.11
32+
uses: actions/setup-python@v4
33+
with:
34+
python-version: '3.11'
35+
cache: 'pip'
36+
37+
- name: Install system dependencies
38+
run: |
39+
sudo apt-get update
40+
sudo apt-get install -y netcat-openbsd
41+
sudo apt-get install -y unixodbc-dev
42+
sudo apt-get install -y libgssapi-krb5-2
43+
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
44+
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
45+
sudo apt-get update
46+
ACCEPT_EULA=Y sudo apt-get install -y msodbcsql18
47+
ACCEPT_EULA=Y sudo apt-get install -y mssql-tools18
48+
49+
- name: Install Python dependencies
50+
run: |
51+
python -m pip install --upgrade pip
52+
pip install -r requirements.txt
53+
pip install -r requirements.dev.txt
54+
55+
- name: Create test directories
56+
run: |
57+
mkdir -p app/files/bqkeys
58+
mkdir -p app/files/sqlite
59+
chmod -R 777 app/files
60+
61+
- name: Run tests
62+
env:
63+
TEST_DB_HOST: localhost
64+
TEST_DB_PORT: 5432
65+
TEST_DB_USER: postgres
66+
TEST_DB_PASSWORD: testpassword
67+
TEST_DB_NAME: testdb
68+
run: |
69+
pytest tests/ -v --cov=app --cov-report=xml
70+
71+

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
app/tests/.pytest_cache
2+
app/tests/__pycache__
3+
testdata/

.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/turbular.iml

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 238 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)