-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into release/0.3
- Loading branch information
Showing
23 changed files
with
207 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 39 additions & 6 deletions
45
.github/actions/build-n-push-binaries-to-ghrelease/build-n-push-windows-binary/action.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,65 @@ | ||
name: Build and push Windows Binary | ||
name: Build, test and push Windows Binary | ||
|
||
description: "Build and push Windows binary" | ||
description: "Build, test and push Windows binary" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.7" | ||
# Step 1: Build | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e ".[dev]" | ||
- name: Generate Binary | ||
shell: bash | ||
run: pyinstaller --distpath ./dist --log-level=DEBUG dvc.spec | ||
run: | | ||
pyinstaller --distpath ./dist --log-level=DEBUG dvc.spec | ||
cp ./dist/dvc.exe . | ||
# Step 2: Test with Postgres | ||
- name: Smoke Test | ||
shell: bash | ||
run: | | ||
echo "Now running simple smoke test to test generated binary" | ||
dvc version | ||
- name: zip windows artifact | ||
./dvc version | ||
- name: Start PostgreSQL on Windows | ||
shell: powershell | ||
run: | | ||
$pgService = Get-Service -Name postgresql* | ||
Set-Service -InputObject $pgService -Status running -StartupType automatic | ||
Start-Process -FilePath "$env:PGBIN\pg_isready" -Wait -PassThru | ||
- name: Create test user on Windows | ||
shell: powershell | ||
run: | | ||
& $env:PGBIN\psql --command="CREATE USER test PASSWORD 'test'" --command="\du" | ||
- name: Create test database | ||
shell: powershell | ||
run: | | ||
& $env:PGBIN\createdb --owner=test test | ||
$env:PGPASSWORD = 'test' | ||
& $env:PGBIN\psql --username=test --host=localhost --list test | ||
- name: Run DVC | ||
shell: bash | ||
run: | | ||
set -a | ||
source ./.github/assets/.github.ci.env | ||
echo "Now checking the env var.." | ||
printenv | ||
echo "Now running dvc....." | ||
./dvc db ping | ||
./dvc db init | ||
./dvc db current | ||
./dvc db upgrade --no-confirm | ||
# Step 3: Zip and Upload artifact | ||
- name: zip windows artifact | ||
shell: powershell | ||
run: | | ||
powershell Compress-Archive ./dist windows.zip | ||
- name: upload Windows artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: uploads | ||
path: windows.zip | ||
path: windows.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Env file for github. For Linux + Mac | ||
# Location is relative to project root | ||
DVC__DATABASE_REVISION_SQL_FILES_FOLDER=./.github/assets/sample_revision_sql_files | ||
DVC__USER=test | ||
DVC__PASSWORD=test | ||
DVC__HOST=localhost | ||
DVC__PORT=5432 | ||
DVC__DBNAME=test | ||
DVC__DBFLAVOUR=postgres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Powershell env | ||
$DVC__DATABASE_REVISION_SQL_FILES_FOLDER='./.github/assets/sample_revision_sql_files' | ||
$DVC__USER='test' | ||
$DVC__PASSWORD='test' | ||
$DVC__HOST='localhost' | ||
$DVC__PORT='5432' | ||
$DVC__DBNAME='test' | ||
$DVC__DBFLAVOUR='postgres' |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,7 +100,7 @@ https://hub.docker.com/repository/docker/kenho811/database-version-control# | |
git clone -b release [email protected]:kenho811/Python_Database_Version_Control.git | ||
# cd to the repository | ||
cd Python_Database_Version_Control | ||
cd Python_Database_Version_Control/docker_compose_demo | ||
# Fnd the docker-compose.yml and run | ||
docker compose up | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.