Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions .github/workflows/main.workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ on:

env:
PROJECT_NAME: soda-core
ADDITIONAL_DATA_SOURCES: oracle # space-separated list of additional data sources

jobs:
check:
Expand Down Expand Up @@ -64,9 +65,10 @@ jobs:
- name: Define modules
id: modules
run: |
echo "INFO: DATA_SOURCE is set to ${DATA_SOURCE}"
if [ "${DATA_SOURCE}" = "all" ]; then
echo modules=$(bash scripts/test_matrix.sh) >> "$GITHUB_OUTPUT"
BASE_MODULES=$(bash scripts/test_matrix.sh)
ADDITIONAL_JSON=$(echo "$ADDITIONAL_DATA_SOURCES" | sed 's/\w\+/,"&"/g' 2>/dev/null || echo "")
echo "modules=[${BASE_MODULES}${ADDITIONAL_JSON}]" >> "$GITHUB_OUTPUT"
else
echo 'modules=["__DATA_SOURCE__"]' | sed "s|__DATA_SOURCE__|${DATA_SOURCE}|g" >> "$GITHUB_OUTPUT"
fi
Expand Down Expand Up @@ -143,11 +145,14 @@ jobs:

- name: Install dependencies
run: |
set -x
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/21.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list > /dev/null
sudo apt-get update
ACCEPT_EULA=Y sudo apt-get install -y libsasl2-dev msodbcsql18



- name: Get external secrets
uses: aws-actions/aws-secretsmanager-get-secrets@v2
env:
Expand All @@ -169,17 +174,31 @@ jobs:
secret-ids: |
BIGQUERY_ACCOUNT_INFO_JSON,/soda/github/common/data-sources/BIGQUERY_ACCOUNT_INFO_JSON

- name: Checkout soda-extensions
uses: actions/checkout@v4
with:
repository: sodadata/soda-extensions
token: ${{ secrets.USER_GITHUB_TOKEN }}
path: soda-extensions
- name: Run tests
run: |
set -x
python -m venv .venv
source .venv/bin/activate

pip install -r dev-requirements.txt
pip install -e soda-core
pip install -e soda-tests
if [ "${{ matrix.module }}" = "synapse" ] || [ "${{ matrix.module }}" = "fabric" ]; then
pip install -e soda-sqlserver
fi
pip install -e soda-${{ matrix.module }}

if [[ " $ADDITIONAL_DATA_SOURCES " =~ " ${{ matrix.module }} " ]]; then
pip install -e soda-extensions/soda-${{ matrix.module }}
else
pip install -e soda-${{ matrix.module }}
fi

export TEST_DATASOURCE=${{ matrix.module }}
python -m pytest -ra soda-tests/tests/features
if [ "${{ matrix.module }}" = "postgres" ]; then
Expand Down
3 changes: 1 addition & 2 deletions scripts/test_matrix.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#!/bin/bash

printf "[";find . -maxdepth 1 -mindepth 1 -type d -name "soda*" -not -name "soda-core" -not -name "soda-tests" -printf '"%f",' | sed 's/,$//;s/soda-//g';printf "]"
printf ;find . -maxdepth 1 -mindepth 1 -type d -name "soda*" -not -name "soda-core" -not -name "soda-tests" -printf '"%f",' | sed 's/,$//;s/soda-//g';
Loading