Skip to content

Commit 68a2f42

Browse files
committed
Merge branch 'next'
2 parents 236e15a + 17f2298 commit 68a2f42

File tree

3 files changed

+102
-5
lines changed

3 files changed

+102
-5
lines changed

.github/workflows/cypress-tests.yml renamed to .github/workflows/pre-release-tests.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ name: Run Cypress Test
22

33
on:
44
workflow_dispatch:
5-
workflow_run:
6-
workflows: ["Upload Python Package"]
7-
types:
8-
- completed
95
# push:
106
# branches:
117
# - next
@@ -17,7 +13,6 @@ jobs:
1713
run-cypress-tests:
1814
name: Run Cypress Tests
1915
runs-on: ubuntu-latest
20-
#if: ${{ github.event.workflow_run.conclusion == 'success' }}
2116
steps:
2217
- name: Checkout repository
2318
uses: actions/checkout@v4

.github/workflows/python-publish.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,106 @@ jobs:
9696
path: dist/
9797
- name: publish dist to ProdPyPI
9898
uses: pypa/gh-action-pypi-publish@release/v1
99+
100+
run-tests:
101+
name: Run Tests
102+
needs: publish-to-prodpypi
103+
if: ${{ success() }}
104+
runs-on: ubuntu-latest
105+
steps:
106+
- name: Checkout repository
107+
uses: actions/checkout@v4
108+
109+
- name: Set up Java
110+
uses: actions/setup-java@v4
111+
with:
112+
distribution: 'corretto'
113+
java-version: '11'
114+
115+
- name: Set up Python
116+
uses: actions/setup-python@v5
117+
with:
118+
python-version: '3.12'
119+
120+
- name: Install Node.js
121+
uses: actions/setup-node@v4
122+
with:
123+
node-version: '20'
124+
125+
- name: Install dependencies
126+
run: npm install
127+
128+
- name: Set environment variables for Cypress
129+
run: |
130+
echo "POSTGRES_CONNECTION_STRING=${{ secrets.POSTGRES_CONNECTION_STRING }}" >> $GITHUB_ENV
131+
echo "DATABRICKS_HOSTNAME=${{ secrets.DATABRICKS_HOSTNAME }}" >> $GITHUB_ENV
132+
echo "DATABRICKS_HTTP_PATH=${{ secrets.DATABRICKS_HTTP_PATH }}" >> $GITHUB_ENV
133+
echo "DATABRICKS_ACCESS_TOKEN=${{ secrets.DATABRICKS_ACCESS_TOKEN }}" >> $GITHUB_ENV
134+
135+
- name: Run Java version check
136+
run: java -version
137+
138+
- name: Run Python version check
139+
run: python --version
99140

141+
- name: Install Dataforge from latest release
142+
run: |
143+
pip install dataforge-core
144+
145+
- name: Run Dataforge version check
146+
run: dataforge --version
147+
148+
- name: Run interactive Dataforge configuration
149+
env:
150+
POSTGRES_CONNECTION_STRING: ${{ secrets.POSTGRES_CONNECTION_STRING }}
151+
DATABRICKS_HOSTNAME: ${{ secrets.DATABRICKS_HOSTNAME }}
152+
DATABRICKS_HTTP_PATH: ${{ secrets.DATABRICKS_HTTP_PATH }}
153+
DATABRICKS_ACCESS_TOKEN: ${{ secrets.DATABRICKS_ACCESS_TOKEN }}
154+
run: |
155+
config_output=$(node scripts/runInteractiveCommand.js --configure)
156+
echo "Dataforge configuration output: $config_output"
157+
if echo "$config_output" | grep -q "Databricks connection validated successfully"; then
158+
echo "Databricks configuration completed successfully."
159+
else
160+
echo "Databricks configuration validation failed."
161+
exit 1
162+
fi
163+
164+
- name: Initialize Dataforge
165+
run: |
166+
init_output=$(dataforge --init)
167+
echo "Dataforge initialization output: $init_output"
168+
if echo "$init_output" | grep -q "Initialized project"; then
169+
echo "Dataforge initialized successfully."
170+
else
171+
echo "Dataforge initialization failed."
172+
exit 1
173+
fi
174+
175+
- name: Run interactive Dataforge seeding
176+
run: node scripts/runInteractiveCommand.js --seed
177+
178+
- name: Run Dataforge build
179+
run: |
180+
build_output=$(dataforge --build)
181+
echo "Dataforge build output: $build_output"
182+
if echo "$build_output" | grep -q "Import completed successfully"; then
183+
echo "build completed successfully."
184+
else
185+
echo "Dataforge build failed."
186+
exit 1
187+
fi
188+
189+
- name: Run Dataforge process
190+
run: |
191+
process_output=$(dataforge --run)
192+
echo "Dataforge process output: $process_output"
193+
if echo "$process_output" | grep -q "Execution completed successfully"; then
194+
echo "run completed successfully."
195+
else
196+
echo "Dataforge process failed."
197+
exit 1
198+
fi
199+
100200

101201

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
[DataForge](https://www.dataforgelabs.com) helps data analysts and engineers build and extend data solutions by leveraging modern software engineering principles.
55

66
[![OSSRank](https://shields.io/endpoint?url=https://ossrank.com/shield/4025)](https://ossrank.com/p/4025)
7+
[![Publish & Test](https://img.shields.io/github/actions/workflow/status/dataforgelabs/dataforge-core/python-publish.yml?label=Publish%20%26%20Test&branch=main)](https://github.com/dataforgelabs/dataforge-core/actions/workflows/python-publish.yml)
8+
79

810
## Understanding DataForge
911

0 commit comments

Comments
 (0)