Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated elgohr/Publish-Docker-Github-Action to a supported version (v5) #1

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
5ea3aa2
Initial work on having two separate db contexts, one for SQLServer on…
Kronos11 Jun 29, 2020
fac7237
Added in unit tests and moved back to old migration
Kronos11 Jun 29, 2020
0022427
Updated E2E tests
Kronos11 Jun 29, 2020
c5e630f
Fixed Functional Tests,
Kronos11 Jun 30, 2020
b025f21
Fix CI Issues
Kronos11 Jun 30, 2020
4556788
Fix ci yml
Kronos11 Jun 30, 2020
9ae61ef
I really don't understand the syntax here.
Kronos11 Jun 30, 2020
55f4ec0
added some logging to help troubleshoot
Kronos11 Jun 30, 2020
fb94e43
Add in detailed sql logging
Kronos11 Jun 30, 2020
93d1aae
Fix unit test
Kronos11 Jun 30, 2020
0447ef2
Fix functional tests for postgres
Kronos11 Jun 30, 2020
1615462
Return null if percentage is 0 or doesn't pass sanity check
Kronos11 Jul 2, 2020
27fd24a
Fix efcore queries and tests
Kronos11 Jul 2, 2020
8d6af2e
First iteration review: changed default variables to be used and crea…
unaizorrilla Jul 6, 2020
33c93c1
Added feedback review: Unify configuration properties to specify the …
unaizorrilla Jul 7, 2020
69ac938
Fix password on github actions
unaizorrilla Jul 7, 2020
bca6d4f
Merge pull request #3 from Xabaril/master
Kronos11 Jul 8, 2020
8a77228
Merge branch 'master' into feature/otherDbStores
Kronos11 Jul 8, 2020
4ac33e5
Fix connection string in github workflows
Kronos11 Jul 8, 2020
1bd4521
Merge pull request #143 from Kronos11/feature/otherDbStores
unaizorrilla Jul 9, 2020
49302c7
Added new compose for npgsql demo with ui and fix env vars on compose
unaizorrilla Jul 9, 2020
d58345d
Merge branch 'Kronos11-feature/otherDbStores' of https://github.com/X…
unaizorrilla Jul 9, 2020
ee22d16
Set docker images as 4.0 version
unaizorrilla Jul 13, 2020
c055365
First iteration on add support for mysql, infrastructure code created…
unaizorrilla Jul 13, 2020
d61dc45
remove code comment
unaizorrilla Jul 13, 2020
bf0ad71
added comment indicating the issue with default values on mysql for b…
unaizorrilla Jul 13, 2020
bb7fcd3
added tests on build.ps1|sh modify github actions and solve issue wit…
unaizorrilla Jul 14, 2020
2fe03c8
Fix services on github actions with mysql
unaizorrilla Jul 14, 2020
224f0f0
remove unused env var on github actions for mysql service
unaizorrilla Jul 14, 2020
891b265
Remove command from mysql service
unaizorrilla Jul 14, 2020
d58215a
remove unnecesary command on mysql docker compose
unaizorrilla Jul 14, 2020
b9c9d6f
fix plot to use dbcontext instead dapper with provider specific queries
unaizorrilla Jul 15, 2020
2a1be5a
set default deployment
unaizorrilla Jul 15, 2020
07c809a
Working on modify default deployment: get configuration does not use …
unaizorrilla Jul 15, 2020
356d450
Remove UI.Store project that got accidentally merged
Kronos11 Jul 15, 2020
3ae3ed5
Fixed test fail on AddProductRequestHandler, enable user to specify d…
unaizorrilla Jul 15, 2020
e229565
Merge pull request #151 from Kronos11/feature/remove-unused-project
unaizorrilla Jul 16, 2020
7add51d
update global.json, dockerfiles, and github actions with new sdk 3.1.302
unaizorrilla Jul 16, 2020
887c5fb
Merge branch 'master' of https://github.com/Xabaril/Esquio
unaizorrilla Jul 16, 2020
1da6f5a
Fix issue on mysql with seed
unaizorrilla Jul 16, 2020
94ba08a
Merge pull request #1 from Xabaril/master
Ramon-Balaguer Jul 16, 2020
cb247ee
Updated elgohr/Publish-Docker-Github-Action to a supported version (v5)
elgohr Mar 28, 2023
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
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "3.1.3",
"version": "3.1.5",
"commands": [
"dotnet-ef"
]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cd-docker-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
tags:
- demo-release-* # Push events to release-*
env:
TAG: 3.1.${{ github.run_id }}
TAG: 4.0.${{ github.run_id }}
REGISTRY: esquio.azurecr.io
ACR_REPO: esquiodemoapp
jobs:
Expand All @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ env.REGISTRY }}/${{ env.ACR_REPO }}
username: ${{ secrets.ESQUIO_DOCKER_USERNAME }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cd-docker-internal-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
tags:
- internal-demo-release-* # Push events to release-*
env:
TAG: 3.1.${{ github.run_id }}
TAG: 4.0.${{ github.run_id }}
REGISTRY: esquio.azurecr.io
ACR_REPO_APP: esquiodemointernalapp
ACR_REPO_UI: esquiodemointernalui
Expand All @@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Publish to Registry internal demo app
uses: elgohr/Publish-Docker-Github-Action@master
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ env.REGISTRY }}/${{ env.ACR_REPO_APP }}
username: ${{ secrets.ESQUIO_DOCKER_USERNAME }}
Expand All @@ -25,7 +25,7 @@ jobs:
tags: "latest,${{ env.TAG }}"

- name: Publish to Registry internal demo ui
uses: elgohr/Publish-Docker-Github-Action@master
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ env.REGISTRY }}/${{ env.ACR_REPO_UI }}
username: ${{ secrets.ESQUIO_DOCKER_USERNAME }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cd-docker-ui-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
tags:
- ui-preview-* # Push events to release-*
env:
TAG: 3.1.${{ github.run_id }}-preview
TAG: 4.0.${{ github.run_id }}-preview
IMAGE_NAME: esquioui
ESQUIO_REPO: xabarilcoding
jobs:
Expand All @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ env.ESQUIO_REPO }}/${{ env.IMAGE_NAME }}
username: ${{ secrets.DOCKER_USERNAME }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cd-docker-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
tags:
- ui-release-* # Push events to release-*
env:
TAG: 3.1.0
TAG: 4.0.0
IMAGE_NAME: esquioui
ESQUIO_REPO: xabarilcoding
jobs:
Expand All @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ env.ESQUIO_REPO }}/${{ env.IMAGE_NAME }}
username: ${{ secrets.DOCKER_USERNAME }}
Expand Down
33 changes: 30 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,46 @@ jobs:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: Password12!
ports:
- 5433:1433
- 5433:1433
postgres:
image: postgres
ports:
- 5434:5432
env:
POSTGRES_PASSWORD: Password12!
mysql:
image: mysql
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: Password12!
MYSQL_USER: mysql
MYSQL_PASSWORD: Password12!
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
dotnet-version: 3.1.302
- name: dotnet build
run: dotnet build Esquio.sln -c $BUILD_CONFIG
- name: dotnet test [UnitTests]
run: dotnet test ./tests/UnitTests/UnitTests.csproj -c $BUILD_CONFIG --no-build
- name: dotnet test [FunctionalTests]
- name: dotnet test [FunctionalTests-SqlServer]
run: dotnet test ./tests/FunctionalTests/FunctionalTests.csproj -c $BUILD_CONFIG --no-build
env:
Data__Store: "SqlServer"
Data__ConnectionString: "Server=tcp:localhost,5433;Initial Catalog=Esquio.UI;User Id=sa;Password=Password12!"
- name: dotnet test [FunctionalTests-Postgres]
run: dotnet test ./tests/FunctionalTests/FunctionalTests.csproj -c $BUILD_CONFIG --no-build
env:
Data__Store: "NpgSql"
Data__ConnectionString: "Host=localhost;Port=5434;Database=Esquio.UI.Tests;User Id=postgres;Password=Password12!"
- name: dotnet test [FunctionalTests-MySql]
run: dotnet test ./tests/FunctionalTests/FunctionalTests.csproj -c $BUILD_CONFIG --no-build
env:
Data__Store: "MySql"
Data__ConnectionString: "Server=localhost;Database=Esquio.UI.Tests;Uid=root;Pwd=Password12!;"
- name: dotnet pack [Esquio]
run: dotnet pack ./src/Esquio/Esquio.csproj -c $BUILD_CONFIG --no-build --include-source --include-symbols -o ./artifacts
- name: dotnet pack [Esquio.AspNetCore]
Expand Down
33 changes: 30 additions & 3 deletions .github/workflows/ci_all_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,42 @@ jobs:
MSSQL_SA_PASSWORD: Password12!
ports:
- 5433:1433
postgres:
image: postgres
ports:
- 5434:5432
env:
POSTGRES_PASSWORD: Password12!
mysql:
image: mysql
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: Password12!
MYSQL_USER: mysql
MYSQL_PASSWORD: Password12!
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
dotnet-version: 3.1.302
- name: dotnet build
run: dotnet build Esquio.sln -c $BUILD_CONFIG
- name: dotnet test [UnitTests]
run: dotnet test ./tests/UnitTests/UnitTests.csproj -c $BUILD_CONFIG --no-build
- name: dotnet test [FunctionalTests]
run: dotnet test ./tests/FunctionalTests/FunctionalTests.csproj -c $BUILD_CONFIG --no-build
- name: dotnet test [FunctionalTests-SqlServer]
run: dotnet test ./tests/FunctionalTests/FunctionalTests.csproj -c $BUILD_CONFIG --no-build
env:
Data__Store: "SqlServer"
Data__ConnectionString: "Server=tcp:localhost,5433;Initial Catalog=Esquio.UI;User Id=sa;Password=Password12!"
- name: dotnet test [FunctionalTests-Postgres]
run: dotnet test ./tests/FunctionalTests/FunctionalTests.csproj -c $BUILD_CONFIG --no-build
env:
Data__Store: "NpgSql"
Data__ConnectionString: "Host=localhost;Port=5434;Database=Esquio.UI.Tests;User Id=postgres;Password=Password12!"
- name: dotnet test [FunctionalTests-MySql]
run: dotnet test ./tests/FunctionalTests/FunctionalTests.csproj -c $BUILD_CONFIG --no-build
env:
Data__Store: "MySql"
Data__ConnectionString: "Server=localhost;Database=Esquio.UI.Tests;Uid=root;Pwd=Password12!;"
33 changes: 30 additions & 3 deletions .github/workflows/ci_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,46 @@ jobs:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: Password12!
ports:
- 5433:1433
- 5433:1433
postgres:
image: postgres
ports:
- 5434:5432
env:
POSTGRES_PASSWORD: Password12!
mysql:
image: mysql
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: Password12!
MYSQL_USER: mysql
MYSQL_PASSWORD: Password12!
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
dotnet-version: 3.1.302
- name: dotnet build
run: dotnet build Esquio.sln -c $BUILD_CONFIG
- name: dotnet test [UnitTests]
run: dotnet test ./tests/UnitTests/UnitTests.csproj -c $BUILD_CONFIG --no-build
- name: dotnet test [FunctionalTests]
- name: dotnet test [FunctionalTests-SqlServer]
run: dotnet test ./tests/FunctionalTests/FunctionalTests.csproj -c $BUILD_CONFIG --no-build
env:
Data__Store: "SqlServer"
Data__ConnectionString: "Server=tcp:localhost,5433;Initial Catalog=Esquio.UI;User Id=sa;Password=Password12!"
- name: dotnet test [FunctionalTests-Postgres]
run: dotnet test ./tests/FunctionalTests/FunctionalTests.csproj -c $BUILD_CONFIG --no-build
env:
Data__Store: "NpgSql"
Data__ConnectionString: "Host=localhost;Port=5434;Database=Esquio.UI.Tests;User Id=postgres;Password=Password12!"
- name: dotnet test [FunctionalTests-MySql]
run: dotnet test ./tests/FunctionalTests/FunctionalTests.csproj -c $BUILD_CONFIG --no-build
env:
Data__Store: "MySql"
Data__ConnectionString: "Server=localhost;Database=Esquio.UI.Tests;Uid=root;Pwd=Password12!;"
- name: dotnet pack [Esquio]
run: dotnet pack ./src/Esquio/Esquio.csproj -c $BUILD_CONFIG --no-build --include-source --include-symbols
- name: dotnet pack [Esquio.AspNetCore]
Expand Down
31 changes: 29 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,45 @@ jobs:
MSSQL_SA_PASSWORD: Password12!
ports:
- 5433:1433
postgres:
image: postgres
ports:
- 5434:5432
env:
POSTGRES_PASSWORD: Password12!
mysql:
image: mysql
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: Password12!
MYSQL_USER: mysql
MYSQL_PASSWORD: Password12!
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
dotnet-version: 3.1.302
- name: dotnet build
run: dotnet build Esquio.sln -c $BUILD_CONFIG
- name: dotnet test [UnitTests]
run: dotnet test ./tests/UnitTests/UnitTests.csproj -c $BUILD_CONFIG --no-build
- name: dotnet test [FunctionalTests]
- name: dotnet test [FunctionalTests-SqlServer]
run: dotnet test ./tests/FunctionalTests/FunctionalTests.csproj -c $BUILD_CONFIG --no-build
env:
Data__Store: "SqlServer"
Data__ConnectionString: "Server=tcp:localhost,5433;Initial Catalog=Esquio.UI;User Id=sa;Password=Password12!"
- name: dotnet test [FunctionalTests-Postgres]
run: dotnet test ./tests/FunctionalTests/FunctionalTests.csproj -c $BUILD_CONFIG --no-build
env:
Data__Store: "NpgSql"
Data__ConnectionString: "Host=localhost;Port=5434;Database=Esquio.UI.Tests;User Id=postgres;Password=Password12!"
- name: dotnet test [FunctionalTests-MySql]
run: dotnet test ./tests/FunctionalTests/FunctionalTests.csproj -c $BUILD_CONFIG --no-build
env:
Data__Store: "MySql"
Data__ConnectionString: "Server=localhost;Database=Esquio.UI.Tests;Uid=root;Pwd=Password12!;"
- name: dotnet pack [Esquio]
run: dotnet pack ./src/Esquio/Esquio.csproj -o ./artifacts -c $BUILD_CONFIG --version-suffix $VERSION_SUFFIX --no-build --include-source --include-symbols
- name: dotnet pack [Esquio.AspNetCore]
Expand Down
31 changes: 29 additions & 2 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,45 @@ jobs:
MSSQL_SA_PASSWORD: Password12!
ports:
- 5433:1433
postgres:
image: postgres
ports:
- 5434:5432
env:
POSTGRES_PASSWORD: Password12!
mysql:
image: mysql
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: Password12!
MYSQL_USER: mysql
MYSQL_PASSWORD: Password12!
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
dotnet-version: 3.1.302
- name: dotnet build
run: dotnet build Esquio.sln -c $BUILD_CONFIG
- name: dotnet test [UnitTests]
run: dotnet test ./tests/UnitTests/UnitTests.csproj -c $BUILD_CONFIG --no-build
- name: dotnet test [FunctionalTests]
- name: dotnet test [FunctionalTests-SqlServer]
run: dotnet test ./tests/FunctionalTests/FunctionalTests.csproj -c $BUILD_CONFIG --no-build
env:
Data__Store: "SqlServer"
Data__ConnectionString: "Server=tcp:localhost,5433;Initial Catalog=Esquio.UI;User Id=sa;Password=Password12!"
- name: dotnet test [FunctionalTests-Postgres]
run: dotnet test ./tests/FunctionalTests/FunctionalTests.csproj -c $BUILD_CONFIG --no-build
env:
Data__Store: "NpgSql"
Data__ConnectionString: "Host=localhost;Port=5434;Database=Esquio.UI.Tests;User Id=postgres;Password=Password12!"
- name: dotnet test [FunctionalTests-MySql]
run: dotnet test ./tests/FunctionalTests/FunctionalTests.csproj -c $BUILD_CONFIG --no-build
env:
Data__Store: "MySql"
Data__ConnectionString: "Server=localhost;Database=Esquio.UI.Tests;Uid=root;Pwd=Password12!;"
- name: dotnet pack [Esquio]
run: dotnet pack ./src/Esquio/Esquio.csproj -c $BUILD_CONFIG --version-suffix $VERSION_SUFFIX --no-build --include-source --include-symbols -o ./artifacts
- name: dotnet pack [Esquio.AspNetCore]
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ Esquio is built against the latest NET Core 3.
* [Install](https://www.microsoft.com/net/download/core#/current) the [required](https://github.com/Xabaril/Esquio/blob/master/global.json) .NET Core SDK
* Run [build.ps1](https://github.com/Xabaril/Esquio/blob/master/build.ps1) in the root of the repo.

## How to run migrations
### For SqlServer
<code>dotnet ef migrations add *MigrationName* --context StoreDbContext --project src/Esquio.UI.Store</code>

And to apply the migration:
<code>
dotnet ef database update --context StoreDbContext --project src/Esquio.UI.Store
</code>
### For Postgres
<code>dotnet ef migrations add *MigrationName* --context NpgSqlContext --project src/Esquio.UI.Store</code>

And to apply the migration:
<code>
dotnet ef database update --context NpgSqlContext --project src/Esquio.UI.Store
</code>

## Acknowledgements
Esquio is built using the following great open source projects and free services:
Expand Down
28 changes: 27 additions & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,36 @@ Write-Output "Starting docker containers"

exec { & docker-compose -f build\docker-compose-infrastructure.yml up -d }

Write-Output "Running functional tests"
Write-Output "Running functional tests SqlServer"

try {

$env:Data__Store='SqlServer'
$env:Data__ConnectionString='Server=tcp:localhost,5433;Initial Catalog=Esquio.UI.Tests;User Id=sa;Password=Password12!'
Push-Location -Path .\tests\FunctionalTests
exec { & dotnet test}
} finally {
Pop-Location
}

Write-Output "Running functional tests Postgress"

try {

$env:Data__Store='NpgSql'
$env:Data__ConnectionString='Host=localhost;Port=5434;Database=Esquio.UI.Tests;User Id=postgres;Password=Password12!'
Push-Location -Path .\tests\FunctionalTests
exec { & dotnet test}
} finally {
Pop-Location
}

Write-Output "Running functional tests MySql"

try {

$env:Data__Store='MySql'
$env:Data__ConnectionString='Server=127.0.0.1;Database=Esquio.UI.Tests;Uid=root;Pwd=Password12!'
Push-Location -Path .\tests\FunctionalTests
exec { & dotnet test}
} finally {
Expand Down
Loading