From 4b99a6d7c4d3ba7a00e2977009ee99859c8d741e Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 20 Feb 2024 22:29:40 +0100 Subject: [PATCH 01/49] fixing powershell typo --- .github/workflows/github-actions.yml | 185 +++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 .github/workflows/github-actions.yml diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml new file mode 100644 index 0000000..26dcbf3 --- /dev/null +++ b/.github/workflows/github-actions.yml @@ -0,0 +1,185 @@ +on: + push: + branches: + - '*' + paths-ignore: + - README.md + tags: + - '*' + schedule: + - cron: '0 18 * * 0' +env: + solution: './*.sln' + buildPlatform: Any CPU + buildConfiguration: Release + dBTestCompareGeneratorVersion: 0.1.0 + SQL_SERVER: localhost + SQL_SERVERINSTANCE: SQLEXPRESS + SQL_SERVERDBNAME: AdventureWorks2008R2 + SQL_SERVER_USERNAME: sa + SQL_SERVER_PASSWORD: yourStrong22Password +jobs: + BuildOnLinux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: | + $tags = git tag --sort=-creatordate + $tag = $tags[0] + Write-Host "##vso[task.setvariable variable=dBTestCompareGeneratorVersion]$tag" + shell: powershell + if: startsWith(github.ref, 'refs/tags/') + - uses: nuget/setup-nuget@v1 + - run: nuget restore ${{ env.solution }} + - run: dotnet build --configuration ${{ env.buildConfiguration }} /p:Version=${{ env.dBTestCompareGeneratorVersion }} + - # "Error: the step 'DockerCompose@0' does not have a conversion path yet" + run: | + echo "Error: the step 'DockerCompose@0' does not have a conversion path yet" + #task: DockerCompose@0 + #inputs: + # containerregistrytype: Container Registry + # dockercomposefile: '**/docker-compose.yml' + # action: Run a Docker Compose command + # dockercomposecommand: up -d + - name: download backup and jdbc drivers + run: | + cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }} +et6.0 + + ./download-backup-and-jdbc-drivers.ps1 + shell: powershell + - name: download latest release + run: | + cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }} +et6.0 + echo ${{ github.run_number }} + ./download-latest-release.ps1 + shell: powershell + - name: restore backup + run: | + cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }} +et6.0 + rm -rfv test-definitions + rm -rfv README.md + rm -rfv LICENSE-3RD-PARTY + rm -rfv LICENSE + ./restore-backup.ps1 + shell: powershell + - name: set chmod run DBTestCompareGenerator + run: | + cd ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0/ + mv ./DBTestCompare*/DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar ./ + chmod 777 ./DBTestCompareGenerator + chmod 777 ./DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar + ls -alR + ./DBTestCompareGenerator + shell: cmd + - name: run DBTestCompare + run: | + cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }} +et6.0\ + .\set-tokens-for-tests.ps1 -OutDir ".\test-definitions\" -FileType "cmpSqlResults-config.xml" -token "\$\{SQL_SERVER\}|\$\{SQL_SERVERDBNAME\}|\$\{SQL_SERVER_USERNAME\}|\$\{SQL_SERVER_PASSWORD\}" -Value "${{ env.SQL_SERVER }}|${{ env.SQL_SERVERDBNAME }}|${{ env.SQL_SERVER_USERNAME }}|${{ env.SQL_SERVER_PASSWORD }}" + $DBTestCompare = (Resolve-Path ".\DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar").ToString() + /usr/bin/java -jar $DBTestCompare + shell: powershell + - # "Error: the step 'PublishTestResults@2' does not have a conversion path yet" + run: | + echo "Error: the step 'PublishTestResults@2' does not have a conversion path yet" + #task: PublishTestResults@2 + #inputs: + # testresultsformat: JUnit + # testresultsfiles: '**/TEST-*.xml' + - name: run DBTestCompare + run: | + cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }} +et6.0 + .\set-appsettings.ps1 ".\" "appsettings.json" "appSettings" "ReadExcelFile|DacpacFolder|Folder|UnpackDacpac" "true|${{ github.workspace }}\Dacpac|${{ github.workspace }}\Current|true" $true + ./DBTestCompareGenerator + .\set-tokens-for-tests.ps1 -OutDir ".\test-definitions\" -FileType "cmpSqlResults-config.xml" -token "\$\{SQL_SERVER\}|\$\{SQL_SERVERDBNAME\}|\$\{SQL_SERVER_USERNAME\}|\$\{SQL_SERVER_PASSWORD\}" -Value "${{ env.SQL_SERVER }}|${{ env.SQL_SERVERDBNAME }}|${{ env.SQL_SERVER_USERNAME }}|${{ env.SQL_SERVER_PASSWORD }}" + $DBTestCompare = (Resolve-Path ".\DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar").ToString() + /usr/bin/java -jar $DBTestCompare + shell: powershell + - # 'Note: This is a third party action and currently only supports Linux: https://github.com/marketplace/actions/create-zip-file' + name: Zip generated objects definition + uses: montudor/action-zip@v0.1.0 + with: + args: zip -qq -r ${{ github.workspace }}/${{ github.run_id }}.zip ${{ github.workspace }}\Current + - name: Publish sql files + uses: actions/upload-artifact@v2 + with: + path: ${{ github.workspace }}/${{ github.run_id }}.zip + name: definitions + - name: Publish dacpack files + uses: actions/upload-artifact@v2 + with: + path: ${{ github.workspace }}\Dacpac/${{ env.SQL_SERVERDBNAME }}.dacpac + name: ${{ env.SQL_SERVERDBNAME }} + - # "Error: the step 'PublishTestResults@2' does not have a conversion path yet" + run: | + echo "Error: the step 'PublishTestResults@2' does not have a conversion path yet" + #task: PublishTestResults@2 + #inputs: + # testresultsformat: JUnit + # testresultsfiles: '**/TEST-*.xml' + - run: | + cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }} +et6.0 + rm -rfv test-definitions zip deploy jdbc_drivers target test-output + rm -f *.bak *.jar *.log + shell: powershell + - uses: actions/upload-artifact@v2 + with: + path: ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 + - # "Error: the step 'GitHubRelease@1' does not have a conversion path yet" + run: | + echo "Error: the step 'GitHubRelease@1' does not have a conversion path yet" + #task: GitHubRelease@1 + #condition: and(succeeded(),startsWith(github.ref, 'refs/tags/')) + #inputs: + # githubconnection: github.com_dbtestcomparegenerator + # repositoryname: ${{ github.repository }} + # action: edit + # tagsource: gitTag + # tagpattern: '\d\.\d' + # target: ${{ env.Build.SourceVersion }} + # tag: ${{ env.dBTestCompareGeneratorVersion }} + # title: Version ${{ env.dBTestCompareGeneratorVersion }} + # changelogcomparetorelease: lastNonDraftReleaseByTag + # changelogtype: commitBased + # assets: ${{ github.workspace }}/DBTestCompareGeneratorLinux${{ env.dBTestCompareGeneratorVersion }}.zip + if: (success() && startsWith(github.ref, 'refs/tags/')) + BuildOnWindows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - run: | + $tags = git tag --sort=-creatordate + $tag = $tags[0] + Write-Host "##vso[task.setvariable variable=dBTestCompareGeneratorVersion]$tag" + shell: powershell + if: startsWith(github.ref, 'refs/tags/') + - uses: nuget/setup-nuget@v1 + - run: nuget restore ${{ env.solution }} + - run: dotnet build --configuration ${{ env.buildConfiguration }} /p:Version=${{ env.dBTestCompareGeneratorVersion }} + - uses: actions/upload-artifact@v2 + with: + path: ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 + - # "Error: the step 'GitHubRelease@1' does not have a conversion path yet" + run: | + echo "Error: the step 'GitHubRelease@1' does not have a conversion path yet" + #task: GitHubRelease@1 + #condition: and(succeeded(),startsWith(github.ref, 'refs/tags/')) + #inputs: + # githubconnection: github.com_dbtestcomparegenerator + # repositoryname: ${{ github.repository }} + # action: edit + # tagsource: gitTag + # tagpattern: '\d\.\d.\d' + # target: ${{ env.Build.SourceVersion }} + # tag: ${{ env.dBTestCompareGeneratorVersion }} + # title: Version ${{ env.dBTestCompareGeneratorVersion }} + # changelogcomparetorelease: lastNonDraftReleaseByTag + # changelogtype: commitBased + # assets: ${{ github.workspace }}/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip + # addchangelog: false + if: (success() && startsWith(github.ref, 'refs/tags/')) \ No newline at end of file From 3d6ffbcce555c308a07c7b8885dbfc11cf395612 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 20 Feb 2024 22:45:56 +0100 Subject: [PATCH 02/49] inital commit for github actions --- .github/workflows/github-actions.yml | 132 ++++++++++----------------- 1 file changed, 47 insertions(+), 85 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 26dcbf3..763fd0e 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -22,50 +22,39 @@ jobs: BuildOnLinux: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - run: | + - uses: actions/checkout@v4 + - shell: pwsh + run: | $tags = git tag --sort=-creatordate $tag = $tags[0] Write-Host "##vso[task.setvariable variable=dBTestCompareGeneratorVersion]$tag" - shell: powershell if: startsWith(github.ref, 'refs/tags/') - uses: nuget/setup-nuget@v1 - run: nuget restore ${{ env.solution }} - run: dotnet build --configuration ${{ env.buildConfiguration }} /p:Version=${{ env.dBTestCompareGeneratorVersion }} - - # "Error: the step 'DockerCompose@0' does not have a conversion path yet" - run: | - echo "Error: the step 'DockerCompose@0' does not have a conversion path yet" - #task: DockerCompose@0 - #inputs: - # containerregistrytype: Container Registry - # dockercomposefile: '**/docker-compose.yml' - # action: Run a Docker Compose command - # dockercomposecommand: up -d + - run: docker-compose -f "./docker/docker-compose.yml" up -d - name: download backup and jdbc drivers + shell: pwsh run: | - cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }} -et6.0 - + cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }}\net6.0 ./download-backup-and-jdbc-drivers.ps1 - shell: powershell - name: download latest release + shell: pwsh run: | - cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }} -et6.0 + cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }}\net6.0 echo ${{ github.run_number }} ./download-latest-release.ps1 - shell: powershell - name: restore backup + shell: pwsh run: | - cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }} -et6.0 + cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }}\net6.0 rm -rfv test-definitions rm -rfv README.md rm -rfv LICENSE-3RD-PARTY rm -rfv LICENSE ./restore-backup.ps1 - shell: powershell - name: set chmod run DBTestCompareGenerator + shell: cmd run: | cd ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0/ mv ./DBTestCompare*/DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar ./ @@ -73,34 +62,30 @@ et6.0 chmod 777 ./DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar ls -alR ./DBTestCompareGenerator - shell: cmd - name: run DBTestCompare + shell: pwsh run: | - cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }} -et6.0\ + cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }}\net6.0 .\set-tokens-for-tests.ps1 -OutDir ".\test-definitions\" -FileType "cmpSqlResults-config.xml" -token "\$\{SQL_SERVER\}|\$\{SQL_SERVERDBNAME\}|\$\{SQL_SERVER_USERNAME\}|\$\{SQL_SERVER_PASSWORD\}" -Value "${{ env.SQL_SERVER }}|${{ env.SQL_SERVERDBNAME }}|${{ env.SQL_SERVER_USERNAME }}|${{ env.SQL_SERVER_PASSWORD }}" $DBTestCompare = (Resolve-Path ".\DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar").ToString() /usr/bin/java -jar $DBTestCompare - shell: powershell - - # "Error: the step 'PublishTestResults@2' does not have a conversion path yet" - run: | - echo "Error: the step 'PublishTestResults@2' does not have a conversion path yet" - #task: PublishTestResults@2 - #inputs: - # testresultsformat: JUnit - # testresultsfiles: '**/TEST-*.xml' + - name: Publish XUnit test results + uses: EnricoMi/publish-unit-test-result-action@v2.4.1 + if: always() + with: + comment_title: XUnit Title + files: "./TEST-*.xml" - name: run DBTestCompare + shell: pwsh run: | - cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }} -et6.0 + cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }}\net6.0 .\set-appsettings.ps1 ".\" "appsettings.json" "appSettings" "ReadExcelFile|DacpacFolder|Folder|UnpackDacpac" "true|${{ github.workspace }}\Dacpac|${{ github.workspace }}\Current|true" $true ./DBTestCompareGenerator .\set-tokens-for-tests.ps1 -OutDir ".\test-definitions\" -FileType "cmpSqlResults-config.xml" -token "\$\{SQL_SERVER\}|\$\{SQL_SERVERDBNAME\}|\$\{SQL_SERVER_USERNAME\}|\$\{SQL_SERVER_PASSWORD\}" -Value "${{ env.SQL_SERVER }}|${{ env.SQL_SERVERDBNAME }}|${{ env.SQL_SERVER_USERNAME }}|${{ env.SQL_SERVER_PASSWORD }}" $DBTestCompare = (Resolve-Path ".\DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar").ToString() /usr/bin/java -jar $DBTestCompare - shell: powershell - - # 'Note: This is a third party action and currently only supports Linux: https://github.com/marketplace/actions/create-zip-file' - name: Zip generated objects definition + + - name: Zip generated objects definition uses: montudor/action-zip@v0.1.0 with: args: zip -qq -r ${{ github.workspace }}/${{ github.run_id }}.zip ${{ github.workspace }}\Current @@ -114,49 +99,37 @@ et6.0 with: path: ${{ github.workspace }}\Dacpac/${{ env.SQL_SERVERDBNAME }}.dacpac name: ${{ env.SQL_SERVERDBNAME }} - - # "Error: the step 'PublishTestResults@2' does not have a conversion path yet" + - name: Publish XUnit test results + uses: EnricoMi/publish-unit-test-result-action@v2.4.1 + if: always() + with: + comment_title: XUnit Title + files: "./TEST-*.xml" + - shell: pwsh run: | - echo "Error: the step 'PublishTestResults@2' does not have a conversion path yet" - #task: PublishTestResults@2 - #inputs: - # testresultsformat: JUnit - # testresultsfiles: '**/TEST-*.xml' - - run: | - cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }} -et6.0 + cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }}\net6.0 rm -rfv test-definitions zip deploy jdbc_drivers target test-output rm -f *.bak *.jar *.log - shell: powershell - uses: actions/upload-artifact@v2 with: path: ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 - - # "Error: the step 'GitHubRelease@1' does not have a conversion path yet" - run: | - echo "Error: the step 'GitHubRelease@1' does not have a conversion path yet" - #task: GitHubRelease@1 - #condition: and(succeeded(),startsWith(github.ref, 'refs/tags/')) - #inputs: - # githubconnection: github.com_dbtestcomparegenerator - # repositoryname: ${{ github.repository }} - # action: edit - # tagsource: gitTag - # tagpattern: '\d\.\d' - # target: ${{ env.Build.SourceVersion }} - # tag: ${{ env.dBTestCompareGeneratorVersion }} - # title: Version ${{ env.dBTestCompareGeneratorVersion }} - # changelogcomparetorelease: lastNonDraftReleaseByTag - # changelogtype: commitBased - # assets: ${{ github.workspace }}/DBTestCompareGeneratorLinux${{ env.dBTestCompareGeneratorVersion }}.zip + - name: Create Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} if: (success() && startsWith(github.ref, 'refs/tags/')) BuildOnWindows: runs-on: windows-latest steps: - uses: actions/checkout@v2 - - run: | + - shell: powershell + run: | $tags = git tag --sort=-creatordate $tag = $tags[0] Write-Host "##vso[task.setvariable variable=dBTestCompareGeneratorVersion]$tag" - shell: powershell if: startsWith(github.ref, 'refs/tags/') - uses: nuget/setup-nuget@v1 - run: nuget restore ${{ env.solution }} @@ -164,22 +137,11 @@ et6.0 - uses: actions/upload-artifact@v2 with: path: ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 - - # "Error: the step 'GitHubRelease@1' does not have a conversion path yet" - run: | - echo "Error: the step 'GitHubRelease@1' does not have a conversion path yet" - #task: GitHubRelease@1 - #condition: and(succeeded(),startsWith(github.ref, 'refs/tags/')) - #inputs: - # githubconnection: github.com_dbtestcomparegenerator - # repositoryname: ${{ github.repository }} - # action: edit - # tagsource: gitTag - # tagpattern: '\d\.\d.\d' - # target: ${{ env.Build.SourceVersion }} - # tag: ${{ env.dBTestCompareGeneratorVersion }} - # title: Version ${{ env.dBTestCompareGeneratorVersion }} - # changelogcomparetorelease: lastNonDraftReleaseByTag - # changelogtype: commitBased - # assets: ${{ github.workspace }}/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip - # addchangelog: false + - name: Create Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} if: (success() && startsWith(github.ref, 'refs/tags/')) \ No newline at end of file From d29cbf1a34c14e29d7b3a3930b6151a3bf9a7fc7 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 20 Feb 2024 22:56:26 +0100 Subject: [PATCH 03/49] fixing typos in project name and docker compose --- .github/workflows/github-actions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 763fd0e..87ae245 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -9,7 +9,7 @@ on: schedule: - cron: '0 18 * * 0' env: - solution: './*.sln' + solution: './DBTestCompareGenerator.sln' buildPlatform: Any CPU buildConfiguration: Release dBTestCompareGeneratorVersion: 0.1.0 @@ -32,7 +32,7 @@ jobs: - uses: nuget/setup-nuget@v1 - run: nuget restore ${{ env.solution }} - run: dotnet build --configuration ${{ env.buildConfiguration }} /p:Version=${{ env.dBTestCompareGeneratorVersion }} - - run: docker-compose -f "./docker/docker-compose.yml" up -d + - run: docker-compose -f "./DBTestCompareGenerator/docker-compose.yml" up -d - name: download backup and jdbc drivers shell: pwsh run: | From 75a09e9e0d07f67d7e095e8c92a72094b9525251 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 20 Feb 2024 23:13:14 +0100 Subject: [PATCH 04/49] adding name of windows artifact, linux fixes --- .github/workflows/github-actions.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 87ae245..3f7bac7 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -54,7 +54,7 @@ jobs: rm -rfv LICENSE ./restore-backup.ps1 - name: set chmod run DBTestCompareGenerator - shell: cmd + shell: bash run: | cd ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0/ mv ./DBTestCompare*/DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar ./ @@ -135,6 +135,7 @@ jobs: - run: nuget restore ${{ env.solution }} - run: dotnet build --configuration ${{ env.buildConfiguration }} /p:Version=${{ env.dBTestCompareGeneratorVersion }} - uses: actions/upload-artifact@v2 + name: DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }} with: path: ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 - name: Create Release From 7d22a8c672b742a3479d6209c54c4e134de2fe60 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 20 Feb 2024 23:22:33 +0100 Subject: [PATCH 05/49] fixing compressing --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 3f7bac7..a2fbd52 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -88,7 +88,7 @@ jobs: - name: Zip generated objects definition uses: montudor/action-zip@v0.1.0 with: - args: zip -qq -r ${{ github.workspace }}/${{ github.run_id }}.zip ${{ github.workspace }}\Current + args: zip -qq -r ${{ github.workspace }}/${{ github.run_id }}.zip ./DBTestCompareGenerator/Current - name: Publish sql files uses: actions/upload-artifact@v2 with: From d620d4c9544fa4aa6d66e22bac44b23a20b4b8fc Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 20 Feb 2024 23:30:35 +0100 Subject: [PATCH 06/49] fixing compressing and tests --- .github/workflows/github-actions.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index a2fbd52..8d34df5 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -69,12 +69,11 @@ jobs: .\set-tokens-for-tests.ps1 -OutDir ".\test-definitions\" -FileType "cmpSqlResults-config.xml" -token "\$\{SQL_SERVER\}|\$\{SQL_SERVERDBNAME\}|\$\{SQL_SERVER_USERNAME\}|\$\{SQL_SERVER_PASSWORD\}" -Value "${{ env.SQL_SERVER }}|${{ env.SQL_SERVERDBNAME }}|${{ env.SQL_SERVER_USERNAME }}|${{ env.SQL_SERVER_PASSWORD }}" $DBTestCompare = (Resolve-Path ".\DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar").ToString() /usr/bin/java -jar $DBTestCompare - - name: Publish XUnit test results - uses: EnricoMi/publish-unit-test-result-action@v2.4.1 - if: always() + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: success() || failure() with: - comment_title: XUnit Title - files: "./TEST-*.xml" + report_paths: '**/TEST-*.xml' - name: run DBTestCompare shell: pwsh run: | @@ -99,12 +98,11 @@ jobs: with: path: ${{ github.workspace }}\Dacpac/${{ env.SQL_SERVERDBNAME }}.dacpac name: ${{ env.SQL_SERVERDBNAME }} - - name: Publish XUnit test results - uses: EnricoMi/publish-unit-test-result-action@v2.4.1 - if: always() + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: success() || failure() with: - comment_title: XUnit Title - files: "./TEST-*.xml" + report_paths: '**/TEST-*.xml' - shell: pwsh run: | cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }}\net6.0 @@ -135,8 +133,8 @@ jobs: - run: nuget restore ${{ env.solution }} - run: dotnet build --configuration ${{ env.buildConfiguration }} /p:Version=${{ env.dBTestCompareGeneratorVersion }} - uses: actions/upload-artifact@v2 - name: DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }} with: + name: DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }} path: ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 - name: Create Release uses: actions/create-release@v1 From e2dfec68f4697d000417297a5a9de3e31c0b0ea4 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 20 Feb 2024 23:40:43 +0100 Subject: [PATCH 07/49] fixing zipping --- .github/workflows/github-actions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 8d34df5..0ac21c5 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -22,7 +22,7 @@ jobs: BuildOnLinux: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v2 - shell: pwsh run: | $tags = git tag --sort=-creatordate @@ -87,7 +87,7 @@ jobs: - name: Zip generated objects definition uses: montudor/action-zip@v0.1.0 with: - args: zip -qq -r ${{ github.workspace }}/${{ github.run_id }}.zip ./DBTestCompareGenerator/Current + args: zip -qq -r ${{ github.workspace }}/${{ github.run_id }}.zip . -i ./DBTestCompareGenerator/Current - name: Publish sql files uses: actions/upload-artifact@v2 with: From 671ac1452c04bdf7acb043b4bb5801df22795028 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 20 Feb 2024 23:54:20 +0100 Subject: [PATCH 08/49] fixing zipping --- .github/workflows/github-actions.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 0ac21c5..eaa5717 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -22,7 +22,7 @@ jobs: BuildOnLinux: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - shell: pwsh run: | $tags = git tag --sort=-creatordate @@ -83,11 +83,10 @@ jobs: .\set-tokens-for-tests.ps1 -OutDir ".\test-definitions\" -FileType "cmpSqlResults-config.xml" -token "\$\{SQL_SERVER\}|\$\{SQL_SERVERDBNAME\}|\$\{SQL_SERVER_USERNAME\}|\$\{SQL_SERVER_PASSWORD\}" -Value "${{ env.SQL_SERVER }}|${{ env.SQL_SERVERDBNAME }}|${{ env.SQL_SERVER_USERNAME }}|${{ env.SQL_SERVER_PASSWORD }}" $DBTestCompare = (Resolve-Path ".\DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar").ToString() /usr/bin/java -jar $DBTestCompare - - name: Zip generated objects definition uses: montudor/action-zip@v0.1.0 with: - args: zip -qq -r ${{ github.workspace }}/${{ github.run_id }}.zip . -i ./DBTestCompareGenerator/Current + args: zip -qq -r ./DBTestCompareGenerator\Current.zip ./DBTestCompareGenerator\Current - name: Publish sql files uses: actions/upload-artifact@v2 with: From 8774f23ab6dfeb3a68a9b6a95983e62f38f44b59 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 21 Feb 2024 00:10:17 +0100 Subject: [PATCH 09/49] fixing zipping --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index eaa5717..2d0a492 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -86,7 +86,7 @@ jobs: - name: Zip generated objects definition uses: montudor/action-zip@v0.1.0 with: - args: zip -qq -r ./DBTestCompareGenerator\Current.zip ./DBTestCompareGenerator\Current + args: zip -r ./DBTestCompareGenerator/${{ github.run_id }}.zip ./DBTestCompareGenerator - name: Publish sql files uses: actions/upload-artifact@v2 with: From 73a637e392e2a631ec70f8a49e5685570c202006 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 21 Feb 2024 00:21:46 +0100 Subject: [PATCH 10/49] fixing zipping --- .github/workflows/github-actions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 2d0a492..ac28ba0 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -78,7 +78,7 @@ jobs: shell: pwsh run: | cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }}\net6.0 - .\set-appsettings.ps1 ".\" "appsettings.json" "appSettings" "ReadExcelFile|DacpacFolder|Folder|UnpackDacpac" "true|${{ github.workspace }}\Dacpac|${{ github.workspace }}\Current|true" $true + ./set-appsettings.ps1 "./" "appsettings.json" "appSettings" "ReadExcelFile|DacpacFolder|Folder|UnpackDacpac" "true|${{ github.workspace }}/Dacpac|${{ github.workspace }}/Current|true" $true ./DBTestCompareGenerator .\set-tokens-for-tests.ps1 -OutDir ".\test-definitions\" -FileType "cmpSqlResults-config.xml" -token "\$\{SQL_SERVER\}|\$\{SQL_SERVERDBNAME\}|\$\{SQL_SERVER_USERNAME\}|\$\{SQL_SERVER_PASSWORD\}" -Value "${{ env.SQL_SERVER }}|${{ env.SQL_SERVERDBNAME }}|${{ env.SQL_SERVER_USERNAME }}|${{ env.SQL_SERVER_PASSWORD }}" $DBTestCompare = (Resolve-Path ".\DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar").ToString() @@ -86,7 +86,7 @@ jobs: - name: Zip generated objects definition uses: montudor/action-zip@v0.1.0 with: - args: zip -r ./DBTestCompareGenerator/${{ github.run_id }}.zip ./DBTestCompareGenerator + args: zip -r ./DBTestCompareGenerator/${{ github.run_id }}.zip ./DBTestCompareGenerator/DBTestCompareGenerator/Current - name: Publish sql files uses: actions/upload-artifact@v2 with: From 768f6031d48b7303c51bbb294e032b70da7bcdca Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 21 Feb 2024 00:26:28 +0100 Subject: [PATCH 11/49] fixing zipping --- .github/workflows/github-actions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index ac28ba0..49eab80 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -86,11 +86,11 @@ jobs: - name: Zip generated objects definition uses: montudor/action-zip@v0.1.0 with: - args: zip -r ./DBTestCompareGenerator/${{ github.run_id }}.zip ./DBTestCompareGenerator/DBTestCompareGenerator/Current + args: zip -r ./DBTestCompareGenerator/DBTestCompareGenerator/${{ github.run_id }}.zip ./DBTestCompareGenerator/DBTestCompareGenerator/Current - name: Publish sql files uses: actions/upload-artifact@v2 with: - path: ${{ github.workspace }}/${{ github.run_id }}.zip + path: ./DBTestCompareGenerator/DBTestCompareGenerator/${{ github.run_id }}.zip name: definitions - name: Publish dacpack files uses: actions/upload-artifact@v2 From 102467039ee53ce3376d750285230ec181e770fe Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 21 Feb 2024 00:31:08 +0100 Subject: [PATCH 12/49] fixing zipping --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 49eab80..3b6a041 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -86,7 +86,7 @@ jobs: - name: Zip generated objects definition uses: montudor/action-zip@v0.1.0 with: - args: zip -r ./DBTestCompareGenerator/DBTestCompareGenerator/${{ github.run_id }}.zip ./DBTestCompareGenerator/DBTestCompareGenerator/Current + args: zip -qq -r /home/runner/work/DBTestCompareGenerator/DBTestCompareGenerator/${{ github.run_id }}.zip /home/runner/work/DBTestCompareGenerator/DBTestCompareGenerator/Current - name: Publish sql files uses: actions/upload-artifact@v2 with: From e997a73ecbe5c08ff1fca13c4402fc84ae5dd540 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 21 Feb 2024 00:34:41 +0100 Subject: [PATCH 13/49] fixing zipping --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 3b6a041..b818f5b 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -86,7 +86,7 @@ jobs: - name: Zip generated objects definition uses: montudor/action-zip@v0.1.0 with: - args: zip -qq -r /home/runner/work/DBTestCompareGenerator/DBTestCompareGenerator/${{ github.run_id }}.zip /home/runner/work/DBTestCompareGenerator/DBTestCompareGenerator/Current + args: zip -r /home/runner/work/DBTestCompareGenerator/DBTestCompareGenerator/${{ github.run_id }}.zip /home/runner/work/DBTestCompareGenerator/DBTestCompareGenerator/Current - name: Publish sql files uses: actions/upload-artifact@v2 with: From cd1610a4205db179695db7e2c5bbc80bf5acf4b2 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 21 Feb 2024 00:37:27 +0100 Subject: [PATCH 14/49] fixing zipping --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index b818f5b..2fe6a09 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -86,7 +86,7 @@ jobs: - name: Zip generated objects definition uses: montudor/action-zip@v0.1.0 with: - args: zip -r /home/runner/work/DBTestCompareGenerator/DBTestCompareGenerator/${{ github.run_id }}.zip /home/runner/work/DBTestCompareGenerator/DBTestCompareGenerator/Current + args: zip -r /home/runner/work/DBTestCompareGenerator/${{ github.run_id }}.zip /home/runner/work/DBTestCompareGenerator/DBTestCompareGenerator/Current - name: Publish sql files uses: actions/upload-artifact@v2 with: From 2a08774cb840325f1a6e9270c2c2f955ce8be6f9 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 21 Feb 2024 00:40:43 +0100 Subject: [PATCH 15/49] fixing zipping --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 2fe6a09..51aafbc 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -86,7 +86,7 @@ jobs: - name: Zip generated objects definition uses: montudor/action-zip@v0.1.0 with: - args: zip -r /home/runner/work/DBTestCompareGenerator/${{ github.run_id }}.zip /home/runner/work/DBTestCompareGenerator/DBTestCompareGenerator/Current + args: zip /home/runner/work/DBTestCompareGenerator/${{ github.run_id }}.zip /home/runner/work/DBTestCompareGenerator/DBTestCompareGenerator/Current -r - name: Publish sql files uses: actions/upload-artifact@v2 with: From d61b34989192af1285586c7fe79fa187ec71b5d6 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 21 Feb 2024 00:43:47 +0100 Subject: [PATCH 16/49] fixing zipping --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 51aafbc..9c61e5e 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -86,7 +86,7 @@ jobs: - name: Zip generated objects definition uses: montudor/action-zip@v0.1.0 with: - args: zip /home/runner/work/DBTestCompareGenerator/${{ github.run_id }}.zip /home/runner/work/DBTestCompareGenerator/DBTestCompareGenerator/Current -r + args: zip -r "${{ github.run_id }}.zip" /home/runner/work/DBTestCompareGenerator/DBTestCompareGenerator/Current - name: Publish sql files uses: actions/upload-artifact@v2 with: From c996bd1ee21ae3581c82bed4726afbc75a8a90bc Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 21 Feb 2024 00:49:36 +0100 Subject: [PATCH 17/49] fixing zipping --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 9c61e5e..eb276cf 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -86,7 +86,7 @@ jobs: - name: Zip generated objects definition uses: montudor/action-zip@v0.1.0 with: - args: zip -r "${{ github.run_id }}.zip" /home/runner/work/DBTestCompareGenerator/DBTestCompareGenerator/Current + args: zip -r ${{ github.workspace }}/${{ github.run_id }}.zip /home/runner/work/DBTestCompareGenerator/DBTestCompareGenerator - name: Publish sql files uses: actions/upload-artifact@v2 with: From 9bd94b1af1a73e5e4aeaf6ab90909679e3ef7880 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 21 Feb 2024 09:29:01 +0100 Subject: [PATCH 18/49] zip fixes --- .github/workflows/github-actions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index eb276cf..5957f20 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -86,11 +86,11 @@ jobs: - name: Zip generated objects definition uses: montudor/action-zip@v0.1.0 with: - args: zip -r ${{ github.workspace }}/${{ github.run_id }}.zip /home/runner/work/DBTestCompareGenerator/DBTestCompareGenerator + args: zip -r ./DBTestCompareGenerator/${{ github.run_id }}.zip ./DBTestCompareGenerator - name: Publish sql files uses: actions/upload-artifact@v2 with: - path: ./DBTestCompareGenerator/DBTestCompareGenerator/${{ github.run_id }}.zip + path: ./DBTestCompareGenerator/${{ github.run_id }}.zip name: definitions - name: Publish dacpack files uses: actions/upload-artifact@v2 From aa28417bdf3b6b5ab48b521d10a9957befd611e9 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Mon, 26 Feb 2024 09:44:14 +0100 Subject: [PATCH 19/49] testing zip changes --- .github/workflows/github-actions.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 5957f20..d1c1286 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -83,15 +83,22 @@ jobs: .\set-tokens-for-tests.ps1 -OutDir ".\test-definitions\" -FileType "cmpSqlResults-config.xml" -token "\$\{SQL_SERVER\}|\$\{SQL_SERVERDBNAME\}|\$\{SQL_SERVER_USERNAME\}|\$\{SQL_SERVER_PASSWORD\}" -Value "${{ env.SQL_SERVER }}|${{ env.SQL_SERVERDBNAME }}|${{ env.SQL_SERVER_USERNAME }}|${{ env.SQL_SERVER_PASSWORD }}" $DBTestCompare = (Resolve-Path ".\DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar").ToString() /usr/bin/java -jar $DBTestCompare + cd ../../../../ + compress-archive -path "DBTestCompareGenerator" testt.zip - name: Zip generated objects definition uses: montudor/action-zip@v0.1.0 with: args: zip -r ./DBTestCompareGenerator/${{ github.run_id }}.zip ./DBTestCompareGenerator + - name: Publish sql files + uses: actions/upload-artifact@v2 + with: + path: testt.zip + name: definitions2 - name: Publish sql files uses: actions/upload-artifact@v2 with: path: ./DBTestCompareGenerator/${{ github.run_id }}.zip - name: definitions + name: definitionstest - name: Publish dacpack files uses: actions/upload-artifact@v2 with: @@ -136,10 +143,9 @@ jobs: name: DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }} path: ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 - name: Create Release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: ncipollo/release-action@v1 with: + artifacts: ./release/DBTestCompare$(dBTestCompareVersion).zip tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} if: (success() && startsWith(github.ref, 'refs/tags/')) \ No newline at end of file From 6d016863807ed209563614b2daf283907e504eb8 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Mon, 26 Feb 2024 12:05:46 +0100 Subject: [PATCH 20/49] testing zip changes --- .github/workflows/github-actions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index d1c1286..c8a55fd 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -57,9 +57,9 @@ jobs: shell: bash run: | cd ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0/ - mv ./DBTestCompare*/DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar ./ + mv "./DBTestCompare"*"/DBTestCompare-"*"-SNAPSHOT-jar-with-dependencies.jar" ./ chmod 777 ./DBTestCompareGenerator - chmod 777 ./DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar + chmod 777 "./DBTestCompare-"*"-SNAPSHOT-jar-with-dependencies.jar" ls -alR ./DBTestCompareGenerator - name: run DBTestCompare From a762eb2ce3262a1d6cfe0c557de66d2079f4f556 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Mon, 26 Feb 2024 12:21:55 +0100 Subject: [PATCH 21/49] testing zip changes --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index c8a55fd..635ee6c 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -53,7 +53,7 @@ jobs: rm -rfv LICENSE-3RD-PARTY rm -rfv LICENSE ./restore-backup.ps1 - - name: set chmod run DBTestCompareGenerator + - name: set chmod run DBTestCompareGeneratorr shell: bash run: | cd ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0/ From 8ca06b60d5d89128a58c4046889d5f8aeeba5b98 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Mon, 26 Feb 2024 23:50:28 +0100 Subject: [PATCH 22/49] testing zip changes --- .github/workflows/github-actions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 635ee6c..5dcef01 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -57,9 +57,9 @@ jobs: shell: bash run: | cd ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0/ - mv "./DBTestCompare"*"/DBTestCompare-"*"-SNAPSHOT-jar-with-dependencies.jar" ./ + mv "./DBTestCompare"* ./ chmod 777 ./DBTestCompareGenerator - chmod 777 "./DBTestCompare-"*"-SNAPSHOT-jar-with-dependencies.jar" + chmod 777 "./DBTestCompare-"* ls -alR ./DBTestCompareGenerator - name: run DBTestCompare From e96961a4dce4a4cbd761f50f943eedceddd85164 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 00:03:04 +0100 Subject: [PATCH 23/49] testing zip changes --- .github/workflows/github-actions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 5dcef01..cbb5f90 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -57,9 +57,9 @@ jobs: shell: bash run: | cd ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0/ - mv "./DBTestCompare"* ./ + mv "DBTestCompare-"*"-SNAPSHOT-jar-with-dependencies.jar" ./ chmod 777 ./DBTestCompareGenerator - chmod 777 "./DBTestCompare-"* + chmod 777 "DBTestCompare-"*"-SNAPSHOT-jar-with-dependencies.jar" ls -alR ./DBTestCompareGenerator - name: run DBTestCompare From 5bf8f7af7343bc0076b04bc70e61e562e4509f2d Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 00:09:12 +0100 Subject: [PATCH 24/49] testing zip changes --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index cbb5f90..e555545 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -33,7 +33,7 @@ jobs: - run: nuget restore ${{ env.solution }} - run: dotnet build --configuration ${{ env.buildConfiguration }} /p:Version=${{ env.dBTestCompareGeneratorVersion }} - run: docker-compose -f "./DBTestCompareGenerator/docker-compose.yml" up -d - - name: download backup and jdbc drivers + - name: download backup and jdbc driverss shell: pwsh run: | cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }}\net6.0 From f2e7cab52e3ec6f6681db7febb657685ea8bc006 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 00:13:45 +0100 Subject: [PATCH 25/49] testing zip changes --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index e555545..0d46112 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -57,7 +57,7 @@ jobs: shell: bash run: | cd ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0/ - mv "DBTestCompare-"*"-SNAPSHOT-jar-with-dependencies.jar" ./ + mv DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar ./ chmod 777 ./DBTestCompareGenerator chmod 777 "DBTestCompare-"*"-SNAPSHOT-jar-with-dependencies.jar" ls -alR From 290f7eb367e2ebd4946ee866fff1045e35aef66c Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 00:22:01 +0100 Subject: [PATCH 26/49] testing zip changes --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 0d46112..8d4993b 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -57,7 +57,7 @@ jobs: shell: bash run: | cd ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0/ - mv DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar ./ + mv ./DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar ./ chmod 777 ./DBTestCompareGenerator chmod 777 "DBTestCompare-"*"-SNAPSHOT-jar-with-dependencies.jar" ls -alR From 4d1f11c4047dacf3f988ea9645866fe2f0b39a23 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 00:31:31 +0100 Subject: [PATCH 27/49] testing zip change --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 8d4993b..58c4cbd 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -57,7 +57,7 @@ jobs: shell: bash run: | cd ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0/ - mv ./DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar ./ + mv ./"DBTestCompare-"*"-SNAPSHOT-jar-with-dependencies.jar" ./ chmod 777 ./DBTestCompareGenerator chmod 777 "DBTestCompare-"*"-SNAPSHOT-jar-with-dependencies.jar" ls -alR From c94381120a1f2d062e6b1b06afd28ed94dca75c2 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 00:36:46 +0100 Subject: [PATCH 28/49] testing zip change --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 58c4cbd..308bb6f 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -57,10 +57,10 @@ jobs: shell: bash run: | cd ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0/ + ls -alR mv ./"DBTestCompare-"*"-SNAPSHOT-jar-with-dependencies.jar" ./ chmod 777 ./DBTestCompareGenerator chmod 777 "DBTestCompare-"*"-SNAPSHOT-jar-with-dependencies.jar" - ls -alR ./DBTestCompareGenerator - name: run DBTestCompare shell: pwsh From 0eabedcb2fe64aee25958591e2ebea377e33382f Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 00:50:50 +0100 Subject: [PATCH 29/49] testing zip change --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 308bb6f..e646251 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -58,7 +58,7 @@ jobs: run: | cd ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0/ ls -alR - mv ./"DBTestCompare-"*"-SNAPSHOT-jar-with-dependencies.jar" ./ + mv *"-SNAPSHOT-jar-with-dependencies.jar" ./ chmod 777 ./DBTestCompareGenerator chmod 777 "DBTestCompare-"*"-SNAPSHOT-jar-with-dependencies.jar" ./DBTestCompareGenerator From 2b5083a0c2419155639defad97f867dd6a363c14 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 01:05:02 +0100 Subject: [PATCH 30/49] testing zip change --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index e646251..8a94242 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -58,7 +58,7 @@ jobs: run: | cd ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0/ ls -alR - mv *"-SNAPSHOT-jar-with-dependencies.jar" ./ + find . -name '*-SNAPSHOT-jar-with-dependencies.jar' -exec mv {} ./ \; chmod 777 ./DBTestCompareGenerator chmod 777 "DBTestCompare-"*"-SNAPSHOT-jar-with-dependencies.jar" ./DBTestCompareGenerator From 0c181f5b9cdef9681588b955ace283ace1b6d4c8 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 09:06:19 +0100 Subject: [PATCH 31/49] testing zip change --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 8a94242..865e176 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -84,7 +84,7 @@ jobs: $DBTestCompare = (Resolve-Path ".\DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar").ToString() /usr/bin/java -jar $DBTestCompare cd ../../../../ - compress-archive -path "DBTestCompareGenerator" testt.zip + compress-archive -path ../DBTestCompareGenerator testt.zip - name: Zip generated objects definition uses: montudor/action-zip@v0.1.0 with: From 8aa9c46c1c1f9fe0d9dc43691ffe7b1410eae234 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 09:29:30 +0100 Subject: [PATCH 32/49] testing zip change --- .github/workflows/github-actions.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 865e176..385b82e 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -84,11 +84,11 @@ jobs: $DBTestCompare = (Resolve-Path ".\DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar").ToString() /usr/bin/java -jar $DBTestCompare cd ../../../../ - compress-archive -path ../DBTestCompareGenerator testt.zip + compress-archive -path ../DBTestCompareGenerator/Current ${{ github.run_id }}.zip - name: Zip generated objects definition uses: montudor/action-zip@v0.1.0 with: - args: zip -r ./DBTestCompareGenerator/${{ github.run_id }}.zip ./DBTestCompareGenerator + args: zip -r ./DBTestCompareGenerator/${{ github.run_id }}.zip ./Current - name: Publish sql files uses: actions/upload-artifact@v2 with: @@ -117,6 +117,7 @@ jobs: - uses: actions/upload-artifact@v2 with: path: ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 + name: DBTestCompareGeneratorLinux${{ env.dBTestCompareGeneratorVersion }} - name: Create Release uses: actions/create-release@v1 env: From 8a00da6ffd98638ed94d9166ee824bca09c19f0d Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 10:00:20 +0100 Subject: [PATCH 33/49] testing zip change --- .github/workflows/github-actions.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 385b82e..56b9005 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -85,24 +85,15 @@ jobs: /usr/bin/java -jar $DBTestCompare cd ../../../../ compress-archive -path ../DBTestCompareGenerator/Current ${{ github.run_id }}.zip - - name: Zip generated objects definition - uses: montudor/action-zip@v0.1.0 - with: - args: zip -r ./DBTestCompareGenerator/${{ github.run_id }}.zip ./Current - - name: Publish sql files - uses: actions/upload-artifact@v2 - with: - path: testt.zip - name: definitions2 - name: Publish sql files uses: actions/upload-artifact@v2 with: path: ./DBTestCompareGenerator/${{ github.run_id }}.zip - name: definitionstest + name: definitions - name: Publish dacpack files uses: actions/upload-artifact@v2 with: - path: ${{ github.workspace }}\Dacpac/${{ env.SQL_SERVERDBNAME }}.dacpac + path: ./Dacpac/${{ env.SQL_SERVERDBNAME }}.dacpac name: ${{ env.SQL_SERVERDBNAME }} - name: Publish Test Report uses: mikepenz/action-junit-report@v4 From 999342f61dbca245a495cde2b74bec7ca81b7d40 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 10:38:20 +0100 Subject: [PATCH 34/49] testing zip change --- .github/workflows/github-actions.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 56b9005..5c57d55 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -85,6 +85,10 @@ jobs: /usr/bin/java -jar $DBTestCompare cd ../../../../ compress-archive -path ../DBTestCompareGenerator/Current ${{ github.run_id }}.zip + - name: Zip generated objects definition + uses: montudor/action-zip@v0.1.0 + with: + args: zip -r ./DBTestCompareGenerator/${{ github.run_id }}.zip ./Current - name: Publish sql files uses: actions/upload-artifact@v2 with: From a4741bd1364cfa258fd2091d35300f5edec334ee Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 15:14:14 +0100 Subject: [PATCH 35/49] updating readme and changes for Release step --- .github/workflows/github-actions.yml | 32 +++++++++++++++++++--------- README.md | 27 +++++++++++------------ 2 files changed, 35 insertions(+), 24 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 5c57d55..4dc76a7 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -57,10 +57,10 @@ jobs: shell: bash run: | cd ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0/ - ls -alR find . -name '*-SNAPSHOT-jar-with-dependencies.jar' -exec mv {} ./ \; chmod 777 ./DBTestCompareGenerator chmod 777 "DBTestCompare-"*"-SNAPSHOT-jar-with-dependencies.jar" + ls -alR ./DBTestCompareGenerator - name: run DBTestCompare shell: pwsh @@ -83,8 +83,6 @@ jobs: .\set-tokens-for-tests.ps1 -OutDir ".\test-definitions\" -FileType "cmpSqlResults-config.xml" -token "\$\{SQL_SERVER\}|\$\{SQL_SERVERDBNAME\}|\$\{SQL_SERVER_USERNAME\}|\$\{SQL_SERVER_PASSWORD\}" -Value "${{ env.SQL_SERVER }}|${{ env.SQL_SERVERDBNAME }}|${{ env.SQL_SERVER_USERNAME }}|${{ env.SQL_SERVER_PASSWORD }}" $DBTestCompare = (Resolve-Path ".\DBTestCompare-*-SNAPSHOT-jar-with-dependencies.jar").ToString() /usr/bin/java -jar $DBTestCompare - cd ../../../../ - compress-archive -path ../DBTestCompareGenerator/Current ${{ github.run_id }}.zip - name: Zip generated objects definition uses: montudor/action-zip@v0.1.0 with: @@ -113,14 +111,19 @@ jobs: with: path: ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 name: DBTestCompareGeneratorLinux${{ env.dBTestCompareGeneratorVersion }} + - name: check files + shell: bash + run: | + ls -alR - name: Create Release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: ncipollo/release-action@v1 with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - if: (success() && startsWith(github.ref, 'refs/tags/')) + token: ${{ secrets.GITHUB_TOKEN }} + artifacts: ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 + tag: ${{ env.dBTestCompareGeneratorVersion }} + name: "Version ${{ env.dBTestCompareGeneratorVersion }}" + skipIfReleaseExists: true + if: success() && startsWith(github.ref, 'refs/tags/') BuildOnWindows: runs-on: windows-latest steps: @@ -144,4 +147,13 @@ jobs: artifacts: ./release/DBTestCompare$(dBTestCompareVersion).zip tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} - if: (success() && startsWith(github.ref, 'refs/tags/')) \ No newline at end of file + if: (success() && startsWith(github.ref, 'refs/tags/')) + - name: Create Release + uses: ncipollo/release-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + artifacts: ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 + tag: ${{ env.dBTestCompareGeneratorVersion }} + name: "Version ${{ env.dBTestCompareGeneratorVersion }}" + skipIfReleaseExists: true + if: success() && startsWith(github.ref, 'refs/tags/') \ No newline at end of file diff --git a/README.md b/README.md index f7f07af..ee84698 100644 --- a/README.md +++ b/README.md @@ -2,24 +2,23 @@ # DBTestCompareGenerator -## Tool for generating database tests that can be run with **[DBTestCompare](https://github.com/ObjectivityLtd/DBTestCompare)** +## Tool for generating database tests that can be run with **[DBTestCompare](https://github.com/Accenture/DBTestCompare)** ### And extracting and unpacking DACPAC **Microsoft SQL Server DAC Package File** using [DacFx package](https://github.com/microsoft/DacFx). -[![Build Status](https://dev.azure.com/DBTestCompare/Build/_apis/build/status/ObjectivityLtd.DBTestCompareGenerator)](https://dev.azure.com/DBTestCompare/Build/_build/latest?definitionId=2&_a=summary) -[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/DBTestCompare/Build/2?compact_message)](https://dev.azure.com/DBTestCompare/Build/_build?definitionId=2&_a=summary) +![DBTestCompare Build](https://github.com/Accenture/DBTestCompareGenerator/actions/workflows/github-actions.yml/badge.svg) Supported databases: **SQL Server** -It reads the definition of tables to be tested from system tables of your database and generates tests which can be executed by [DBTestCompare](https://github.com/ObjectivityLtd/DBTestCompare/wiki/Getting-started) application. +It reads the definition of tables to be tested from system tables of your database and generates tests which can be executed by [DBTestCompare](https://github.com/Accenture/DBTestCompare/wiki/Getting-started) application. ```sql SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME,COLUMN_NAME, IS_NULLABLE, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS order by 1,2,3; ``` -![table-definition](https://github.com/ObjectivityLtd/DBTestCompareGenerator/blob/master/DBTestCompareGenerator/images/table-definition.png) +![table-definition](https://github.com/Accenture/DBTestCompareGenerator/blob/master/DBTestCompareGenerator/images/table-definition.png) -### 1. To start using **DBTestCompareGenerator** download the latest [release](https://github.com/ObjectivityLtd/DBTestCompareGenerator/releases) and set connection string to your database in *appsettings.json* file. +### 1. To start using **DBTestCompareGenerator** download the latest [release](https://github.com/Accenture/DBTestCompareGenerator/releases) and set connection string to your database in *appsettings.json* file. ```json { @@ -69,7 +68,7 @@ SELECT ``` -- [Fetch](https://github.com/ObjectivityLtd/DBTestCompare/wiki/Fetch) tests – comparing two queries in DBTestCompare tool memory (between any two databases) +- [Fetch](https://github.com/Accenture/DBTestCompare/wiki/Fetch) tests – comparing two queries in DBTestCompare tool memory (between any two databases) ```sql SELECT "BusinessEntityID", @@ -88,7 +87,7 @@ order by BusinessEntityID; ``` -- [Minus](https://github.com/ObjectivityLtd/DBTestCompare/wiki/Minus) test - compare two queries by db engine (on one server) using MINUS/EXCEPT Sql operator +- [Minus](https://github.com/Accenture/DBTestCompare/wiki/Minus) test - compare two queries by db engine (on one server) using MINUS/EXCEPT Sql operator ```sql SELECT "AddressTypeID" , @@ -121,7 +120,7 @@ You should choose which tests you want to execute Minus or Fetch and disable one ### 3. If you want to choose for which tables generate tests, set *ReadExcelFile* to *true* in *appsettings.json* and fill in a list of tables in file */Templates/Table_Config.xlsx*. -![Excel file](https://github.com/ObjectivityLtd/DBTestCompareGenerator/blob/master/DBTestCompareGenerator/images/Excel.png) +![Excel file](https://github.com/Accenture/DBTestCompareGenerator/blob/master/DBTestCompareGenerator/images/Excel.png) In the excel file for e.g huge tables which comparing can be time-consuming, you can choose in AggregateByClause column of Excel file columns to be aggregated as SUM (for columns in the table contains numeric values). @@ -144,28 +143,28 @@ group by Color order by Color; ``` -### 4. If you want to change any setting in *appsettings.json* in your CI tool you can use script [set-appsettings.ps1](https://github.com/ObjectivityLtd/DBTestCompareGenerator/blob/master/DBTestCompareGenerator/set-appsettings.ps1). +### 4. If you want to change any setting in *appsettings.json* in your CI tool you can use script [set-appsettings.ps1](https://github.com/Accenture/DBTestCompareGenerator/blob/master/DBTestCompareGenerator/set-appsettings.ps1).  ```powershell .\set-appsettings.ps1 ".\" "appsettings.json" "appSettings" "ReadExcelFile" "true" $true  ``` -### 5. Before execution of your generated tests, you have to replace tokens in the connection definition file [cmpSqlResults-config.xml](https://github.com/ObjectivityLtd/DBTestCompareGenerator/blob/master/DBTestCompareGenerator/Templates/cmpSqlResults-config.xml) +### 5. Before execution of your generated tests, you have to replace tokens in the connection definition file [cmpSqlResults-config.xml](https://github.com/Accenture/DBTestCompareGenerator/blob/master/DBTestCompareGenerator/Templates/cmpSqlResults-config.xml) -You can use for that attached PowerShell script [set-tokens-for-tests.ps1](https://github.com/ObjectivityLtd/DBTestCompareGenerator/blob/master/DBTestCompareGenerator/set-tokens-for-tests.ps1) +You can use for that attached PowerShell script [set-tokens-for-tests.ps1](https://github.com/Accenture/DBTestCompareGenerator/blob/master/DBTestCompareGenerator/set-tokens-for-tests.ps1)  ```powershell .\set-tokens-for-tests.ps1 -OutDir ".\test-definitions\" -FileType "cmpSqlResults-config.xml" -token "\$\{SQL_SERVER\}|\$\{SQL_SERVERDBNAME\}|\$\{SQL_SERVER_USERNAME\}|\$\{SQL_SERVER_PASSWORD\}" -Value "localhost|AdventureWorks2008R2|SA|yourStrong22Password"  ``` -### 6.To execute tests download the latest version of [DBTestCompare](https://github.com/ObjectivityLtd/DBTestCompare) from [here](https://github.com/ObjectivityLtd/DBTestCompare/releases) and [SQL Server JDBC Drivers](https://github.com/ObjectivityLtd/DBTestCompare/wiki/Deploying-licensed-jdbc-drivers-(not-open-source)) +### 6.To execute tests download the latest version of [DBTestCompare](https://github.com/Accenture/DBTestCompare) from [here](https://github.com/Accenture/DBTestCompare/releases) and [SQL Server JDBC Drivers](https://github.com/Accenture/DBTestCompare/wiki/Deploying-licensed-jdbc-drivers-(not-open-source)) ### And run program (Java 8 must be installed first (JDK or JRE)): If you set JAVA_HOME variable: ``` java -jar DBTestCompare-1.0-SNAPSHOT-jar-with-dependencies.jar ``` -More details can be found [here](https://github.com/ObjectivityLtd/DBTestCompare/wiki/Getting-started) +More details can be found [here](https://github.com/Accenture/DBTestCompare/wiki/Getting-started) ### 7. To extract and unpack DACPAC **Microsoft SQL Server DAC Package File** change following settings in *appsettings.json* From 6cac2dbcee85e5976c708ba54e9664b4d0bee549 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 16:43:23 +0100 Subject: [PATCH 36/49] fixes for Release step --- .github/workflows/github-actions.yml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 4dc76a7..49e6cd3 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -111,17 +111,19 @@ jobs: with: path: ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 name: DBTestCompareGeneratorLinux${{ env.dBTestCompareGeneratorVersion }} + - shell: pwsh + run: compress-archive -path ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 ./DBTestCompareGenerator/DBTestCompareGeneratorLinux${{ env.dBTestCompareGeneratorVersion }}.zip - name: check files shell: bash run: | ls -alR - - name: Create Release + - name: Create Release Linux uses: ncipollo/release-action@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - artifacts: ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 - tag: ${{ env.dBTestCompareGeneratorVersion }} - name: "Version ${{ env.dBTestCompareGeneratorVersion }}" + artifacts: ./DBTestCompareGenerator/DBTestCompareGeneratorLinux${{ env.dBTestCompareGeneratorVersion }}.zip + tag: DBTestCompareGeneratorLinux_${{ env.dBTestCompareGeneratorVersion }} + name: "DBTestCompareGeneratorLinux Version ${{ env.dBTestCompareGeneratorVersion }}" skipIfReleaseExists: true if: success() && startsWith(github.ref, 'refs/tags/') BuildOnWindows: @@ -141,19 +143,14 @@ jobs: with: name: DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }} path: ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 - - name: Create Release - uses: ncipollo/release-action@v1 - with: - artifacts: ./release/DBTestCompare$(dBTestCompareVersion).zip - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - if: (success() && startsWith(github.ref, 'refs/tags/')) - - name: Create Release + - shell: powershell + run: compress-archive -path ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 ./DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip + - name: Create Release Windows uses: ncipollo/release-action@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - artifacts: ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 - tag: ${{ env.dBTestCompareGeneratorVersion }} - name: "Version ${{ env.dBTestCompareGeneratorVersion }}" + artifacts: ../DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip + tag: DBTestCompareGeneratorWindows_${{ env.dBTestCompareGeneratorVersion }} + name: "DBTestCompareGeneratorWindows Version ${{ env.dBTestCompareGeneratorVersion }}" skipIfReleaseExists: true if: success() && startsWith(github.ref, 'refs/tags/') \ No newline at end of file From d7d4619d1cf7c04bfd5b1b20eb1d8e2a6432dcff Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 17:06:04 +0100 Subject: [PATCH 37/49] fixes for Release step --- .github/workflows/github-actions.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 49e6cd3..9d145e7 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -144,12 +144,13 @@ jobs: name: DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }} path: ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 - shell: powershell - run: compress-archive -path ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 ./DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip + run: | + compress-archive -Path ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 -DestinationPath ./DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip - name: Create Release Windows uses: ncipollo/release-action@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - artifacts: ../DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip + artifacts: ./DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip tag: DBTestCompareGeneratorWindows_${{ env.dBTestCompareGeneratorVersion }} name: "DBTestCompareGeneratorWindows Version ${{ env.dBTestCompareGeneratorVersion }}" skipIfReleaseExists: true From 3bd2e8464d304440cb4abf2954bc3c9abe3b0abb Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 17:20:45 +0100 Subject: [PATCH 38/49] fixes for Release step --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 9d145e7..a18bbca 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -12,7 +12,7 @@ env: solution: './DBTestCompareGenerator.sln' buildPlatform: Any CPU buildConfiguration: Release - dBTestCompareGeneratorVersion: 0.1.0 + dBTestCompareGeneratorVersion: 0.3.0 SQL_SERVER: localhost SQL_SERVERINSTANCE: SQLEXPRESS SQL_SERVERDBNAME: AdventureWorks2008R2 From 3f04e709a82026a58bd42b89c0096df3165102c0 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 17:36:38 +0100 Subject: [PATCH 39/49] fixes for Release step --- .github/workflows/github-actions.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index a18bbca..aa7ffc5 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -122,8 +122,6 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} artifacts: ./DBTestCompareGenerator/DBTestCompareGeneratorLinux${{ env.dBTestCompareGeneratorVersion }}.zip - tag: DBTestCompareGeneratorLinux_${{ env.dBTestCompareGeneratorVersion }} - name: "DBTestCompareGeneratorLinux Version ${{ env.dBTestCompareGeneratorVersion }}" skipIfReleaseExists: true if: success() && startsWith(github.ref, 'refs/tags/') BuildOnWindows: @@ -151,7 +149,5 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} artifacts: ./DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip - tag: DBTestCompareGeneratorWindows_${{ env.dBTestCompareGeneratorVersion }} - name: "DBTestCompareGeneratorWindows Version ${{ env.dBTestCompareGeneratorVersion }}" skipIfReleaseExists: true if: success() && startsWith(github.ref, 'refs/tags/') \ No newline at end of file From 431dcd88889f3e09ede6f43e3c05f9d376de4e72 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 17:46:35 +0100 Subject: [PATCH 40/49] fixes for Release step --- .github/workflows/github-actions.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index aa7ffc5..e45e502 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -122,6 +122,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} artifacts: ./DBTestCompareGenerator/DBTestCompareGeneratorLinux${{ env.dBTestCompareGeneratorVersion }}.zip + name: "Version ${{ env.dBTestCompareGeneratorVersion }}" skipIfReleaseExists: true if: success() && startsWith(github.ref, 'refs/tags/') BuildOnWindows: @@ -148,6 +149,7 @@ jobs: uses: ncipollo/release-action@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - artifacts: ./DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip + artifacts: ./DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip + name: "Version ${{ env.dBTestCompareGeneratorVersion }}" skipIfReleaseExists: true if: success() && startsWith(github.ref, 'refs/tags/') \ No newline at end of file From f6cddf8addbc4c62924987846c0c0f817304e3ff Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 22:53:52 +0100 Subject: [PATCH 41/49] changing the release steps to add 2 artifacts --- .github/workflows/github-actions.yml | 40 +++++++++++++++++++--------- 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index e45e502..16d4879 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -29,6 +29,18 @@ jobs: $tag = $tags[0] Write-Host "##vso[task.setvariable variable=dBTestCompareGeneratorVersion]$tag" if: startsWith(github.ref, 'refs/tags/') + - name: release + uses: actions/create-release@v1 + id: create_release + with: + draft: false + prerelease: false + release_name: "Version ${{ env.dBTestCompareGeneratorVersion }}" + tag_name: ${{ github.ref }} + body_path: CHANGELOG.md + env: + GITHUB_TOKEN: ${{ github.token }} + if: startsWith(github.ref, 'refs/tags/') - uses: nuget/setup-nuget@v1 - run: nuget restore ${{ env.solution }} - run: dotnet build --configuration ${{ env.buildConfiguration }} /p:Version=${{ env.dBTestCompareGeneratorVersion }} @@ -117,13 +129,15 @@ jobs: shell: bash run: | ls -alR - - name: Create Release Linux - uses: ncipollo/release-action@v1 + - name: upload linux artifact + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} with: - token: ${{ secrets.GITHUB_TOKEN }} - artifacts: ./DBTestCompareGenerator/DBTestCompareGeneratorLinux${{ env.dBTestCompareGeneratorVersion }}.zip - name: "Version ${{ env.dBTestCompareGeneratorVersion }}" - skipIfReleaseExists: true + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./DBTestCompareGenerator/DBTestCompareGeneratorLinux${{ env.dBTestCompareGeneratorVersion }}.zip + asset_name: DBTestCompareGeneratorLinux${{ env.dBTestCompareGeneratorVersion }}.zip + asset_content_type: application/zip if: success() && startsWith(github.ref, 'refs/tags/') BuildOnWindows: runs-on: windows-latest @@ -145,11 +159,13 @@ jobs: - shell: powershell run: | compress-archive -Path ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 -DestinationPath ./DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip - - name: Create Release Windows - uses: ncipollo/release-action@v1 + - name: upload linux artifact + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} with: - token: ${{ secrets.GITHUB_TOKEN }} - artifacts: ./DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip - name: "Version ${{ env.dBTestCompareGeneratorVersion }}" - skipIfReleaseExists: true + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: /DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip + asset_name: DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip + asset_content_type: application/zip if: success() && startsWith(github.ref, 'refs/tags/') \ No newline at end of file From 2715e55e71c36022e00d84d77a622493dfe80479 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 23:02:25 +0100 Subject: [PATCH 42/49] changing the release steps to add 2 artifacts --- .github/workflows/github-actions.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 16d4879..5797dcd 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -37,7 +37,6 @@ jobs: prerelease: false release_name: "Version ${{ env.dBTestCompareGeneratorVersion }}" tag_name: ${{ github.ref }} - body_path: CHANGELOG.md env: GITHUB_TOKEN: ${{ github.token }} if: startsWith(github.ref, 'refs/tags/') From e14028fb19b71deaf20ddde6ed0575ca4222c282 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Tue, 27 Feb 2024 23:23:05 +0100 Subject: [PATCH 43/49] release changes for windows --- .github/workflows/github-actions.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 5797dcd..5d824e6 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -44,7 +44,7 @@ jobs: - run: nuget restore ${{ env.solution }} - run: dotnet build --configuration ${{ env.buildConfiguration }} /p:Version=${{ env.dBTestCompareGeneratorVersion }} - run: docker-compose -f "./DBTestCompareGenerator/docker-compose.yml" up -d - - name: download backup and jdbc driverss + - name: download backup and jdbc drivers shell: pwsh run: | cd .\DBTestCompareGenerator\bin\${{ env.buildConfiguration }}\net6.0 @@ -158,12 +158,16 @@ jobs: - shell: powershell run: | compress-archive -Path ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 -DestinationPath ./DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip + - name: Gets latest created release info + id: latest_release_info + uses: jossef/action-latest-release-info@v1.2.2 + if: success() && startsWith(github.ref, 'refs/tags/') - name: upload linux artifact uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ steps.latest_release_info.outputs.upload_url }} asset_path: /DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip asset_name: DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip asset_content_type: application/zip From 6edd3d2c240340e4c15d48e70f61ba1590164bb3 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 28 Feb 2024 00:16:48 +0100 Subject: [PATCH 44/49] release changes for windows --- .github/workflows/github-actions.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 5d824e6..cb13b5c 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -158,16 +158,19 @@ jobs: - shell: powershell run: | compress-archive -Path ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 -DestinationPath ./DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip - - name: Gets latest created release info - id: latest_release_info - uses: jossef/action-latest-release-info@v1.2.2 + - name: "call action" + id: last_release + uses: InsonusK/get-latest-release@v1.0.1 + with: + myToken: ${{ github.token }} + view_top: 1 if: success() && startsWith(github.ref, 'refs/tags/') - name: upload linux artifact uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ steps.latest_release_info.outputs.upload_url }} + upload_url: ${{ steps.last_release.outputs.url }}" asset_path: /DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip asset_name: DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip asset_content_type: application/zip From cd65cdda9a16fceb413d215357fe686808c3fcfc Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 28 Feb 2024 00:25:06 +0100 Subject: [PATCH 45/49] release changes for windows --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index cb13b5c..4631973 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -171,7 +171,7 @@ jobs: GITHUB_TOKEN: ${{ github.token }} with: upload_url: ${{ steps.last_release.outputs.url }}" - asset_path: /DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip + asset_path: ./DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip asset_name: DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip asset_content_type: application/zip if: success() && startsWith(github.ref, 'refs/tags/') \ No newline at end of file From 2889aebb1be0475f78a69758b7e6855fb14a74bc Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 28 Feb 2024 11:33:11 +0100 Subject: [PATCH 46/49] release changes for windows --- .github/workflows/github-actions.yml | 40 ++++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 4631973..19c5e7e 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -29,17 +29,6 @@ jobs: $tag = $tags[0] Write-Host "##vso[task.setvariable variable=dBTestCompareGeneratorVersion]$tag" if: startsWith(github.ref, 'refs/tags/') - - name: release - uses: actions/create-release@v1 - id: create_release - with: - draft: false - prerelease: false - release_name: "Version ${{ env.dBTestCompareGeneratorVersion }}" - tag_name: ${{ github.ref }} - env: - GITHUB_TOKEN: ${{ github.token }} - if: startsWith(github.ref, 'refs/tags/') - uses: nuget/setup-nuget@v1 - run: nuget restore ${{ env.solution }} - run: dotnet build --configuration ${{ env.buildConfiguration }} /p:Version=${{ env.dBTestCompareGeneratorVersion }} @@ -128,12 +117,19 @@ jobs: shell: bash run: | ls -alR + - run: | + upload_url=$(curl -sL https://api.github.com/repos/Accenture/DBTestCompareGenerator/releases/latest | jq -r '.upload_url') + echo UPLOAD_URL=$upload_url >> $GITHUB_ENV + shell: bash + - uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ env.UPLOAD_URL }} - name: upload linux artifact uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ env.UPLOAD_URL }} asset_path: ./DBTestCompareGenerator/DBTestCompareGeneratorLinux${{ env.dBTestCompareGeneratorVersion }}.zip asset_name: DBTestCompareGeneratorLinux${{ env.dBTestCompareGeneratorVersion }}.zip asset_content_type: application/zip @@ -148,6 +144,17 @@ jobs: $tag = $tags[0] Write-Host "##vso[task.setvariable variable=dBTestCompareGeneratorVersion]$tag" if: startsWith(github.ref, 'refs/tags/') + - name: release + uses: actions/create-release@v1 + id: create_release + with: + draft: false + prerelease: false + release_name: "Version ${{ env.dBTestCompareGeneratorVersion }}" + tag_name: ${{ github.ref }} + env: + GITHUB_TOKEN: ${{ github.token }} + if: startsWith(github.ref, 'refs/tags/') - uses: nuget/setup-nuget@v1 - run: nuget restore ${{ env.solution }} - run: dotnet build --configuration ${{ env.buildConfiguration }} /p:Version=${{ env.dBTestCompareGeneratorVersion }} @@ -158,19 +165,12 @@ jobs: - shell: powershell run: | compress-archive -Path ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 -DestinationPath ./DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip - - name: "call action" - id: last_release - uses: InsonusK/get-latest-release@v1.0.1 - with: - myToken: ${{ github.token }} - view_top: 1 - if: success() && startsWith(github.ref, 'refs/tags/') - name: upload linux artifact uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ steps.last_release.outputs.url }}" + upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip asset_name: DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip asset_content_type: application/zip From 16de425596c472fc3b7488c32dfc94de96016bc3 Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 28 Feb 2024 11:40:34 +0100 Subject: [PATCH 47/49] removing unnecessary step for linux --- .github/workflows/github-actions.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 19c5e7e..4624a7c 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -121,9 +121,6 @@ jobs: upload_url=$(curl -sL https://api.github.com/repos/Accenture/DBTestCompareGenerator/releases/latest | jq -r '.upload_url') echo UPLOAD_URL=$upload_url >> $GITHUB_ENV shell: bash - - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ env.UPLOAD_URL }} - name: upload linux artifact uses: actions/upload-release-asset@v1 env: From 7783702547fa7abbdd1d99497e85886801e3d3ad Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 28 Feb 2024 11:56:12 +0100 Subject: [PATCH 48/49] removing unnecessary step for linux --- .github/workflows/github-actions.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 4624a7c..20b88a8 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -117,10 +117,10 @@ jobs: shell: bash run: | ls -alR - - run: | - upload_url=$(curl -sL https://api.github.com/repos/Accenture/DBTestCompareGenerator/releases/latest | jq -r '.upload_url') - echo UPLOAD_URL=$upload_url >> $GITHUB_ENV - shell: bash + - shell: bash + run: | + upload_url=$(curl -sL https://api.github.com/repos/Accenture/DBTestCompareGenerator/releases/latest | jq -r '.upload_url') + echo UPLOAD_URL=$upload_url >> $GITHUB_ENV - name: upload linux artifact uses: actions/upload-release-asset@v1 env: From 34472328d4ac476edf3b17bb0055b276e6625daa Mon Sep 17 00:00:00 2001 From: Maciej Antosiak Date: Wed, 28 Feb 2024 12:05:34 +0100 Subject: [PATCH 49/49] fixing typos and removing unnecessary steps --- .github/workflows/github-actions.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 20b88a8..74f092a 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -53,7 +53,7 @@ jobs: rm -rfv LICENSE-3RD-PARTY rm -rfv LICENSE ./restore-backup.ps1 - - name: set chmod run DBTestCompareGeneratorr + - name: set chmod run DBTestCompareGenerator shell: bash run: | cd ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0/ @@ -113,15 +113,11 @@ jobs: name: DBTestCompareGeneratorLinux${{ env.dBTestCompareGeneratorVersion }} - shell: pwsh run: compress-archive -path ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 ./DBTestCompareGenerator/DBTestCompareGeneratorLinux${{ env.dBTestCompareGeneratorVersion }}.zip - - name: check files - shell: bash - run: | - ls -alR - shell: bash run: | upload_url=$(curl -sL https://api.github.com/repos/Accenture/DBTestCompareGenerator/releases/latest | jq -r '.upload_url') echo UPLOAD_URL=$upload_url >> $GITHUB_ENV - - name: upload linux artifact + - name: Upload linux artifact to Release uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ github.token }} @@ -141,7 +137,7 @@ jobs: $tag = $tags[0] Write-Host "##vso[task.setvariable variable=dBTestCompareGeneratorVersion]$tag" if: startsWith(github.ref, 'refs/tags/') - - name: release + - name: Create a new release uses: actions/create-release@v1 id: create_release with: @@ -162,7 +158,7 @@ jobs: - shell: powershell run: | compress-archive -Path ./DBTestCompareGenerator/bin/${{ env.buildConfiguration }}/net6.0 -DestinationPath ./DBTestCompareGenerator/DBTestCompareGeneratorWindows${{ env.dBTestCompareGeneratorVersion }}.zip - - name: upload linux artifact + - name: Upload windows artifact to Release uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ github.token }}