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

FunctionalTests: remove GitCommands tests #535

Merged
merged 3 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 1 addition & 95 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, windows-2019, macos-10.15]
os: [ ubuntu-20.04, windows-2019, macos-13]
features: [ignored]

env:
Expand All @@ -43,97 +43,3 @@ jobs:

- name: Unit test
run: dotnet test --no-restore

- name: Setup platform (Linux)
if: runner.os == 'Linux'
run: |
echo "BUILD_PLATFORM=${{ runner.os }}" >>$GITHUB_ENV
echo "TRACE2_BASENAME=Trace2.${{ github.run_id }}__${{ github.run_number }}__${{ matrix.os }}__${{ matrix.features }}" >>$GITHUB_ENV

- name: Setup platform (Mac)
if: runner.os == 'macOS'
run: |
echo 'BUILD_PLATFORM=Mac' >>$GITHUB_ENV
echo "TRACE2_BASENAME=Trace2.${{ github.run_id }}__${{ github.run_number }}__${{ matrix.os }}__${{ matrix.features }}" >>$GITHUB_ENV

- name: Setup platform (Windows)
if: runner.os == 'Windows'
run: |
echo "BUILD_PLATFORM=${{ runner.os }}" >>$env:GITHUB_ENV
echo 'BUILD_FILE_EXT=.exe' >>$env:GITHUB_ENV
echo "TRACE2_BASENAME=Trace2.${{ github.run_id }}__${{ github.run_number }}__${{ matrix.os }}__${{ matrix.features }}" >>$env:GITHUB_ENV

- name: Setup Git installer
shell: bash
run: |
GIT_VERSION=$(grep '<GitPackageVersion>' Directory.Build.props | grep -Eo '[0-9.]+(-\w+)*')
cd ../out
dotnet new classlib -n Scalar.GitInstaller
cd Scalar.GitInstaller
cp ../../scalar/nuget.config .
dotnet add Scalar.GitInstaller.csproj package "GitFor${BUILD_PLATFORM}.GVFS.Installer" --package-directory . --version "$GIT_VERSION" --source "https://pkgs.dev.azure.com/gvfs/ci/_packaging/Dependencies/nuget/v3/index.json"

- name: Install Git (Linux)
if: runner.os == 'Linux'
run: |
cd ../out/Scalar.GitInstaller
sudo apt-get install -y $(find . -type f -name '*.deb')

- name: Install Git (Mac)
if: runner.os == 'macOS'
run: |
cd ../out/Scalar.GitInstaller
sudo /usr/sbin/installer -pkg $(find . -type f -name '*.pkg') -target /

- name: Install Git (Windows)
if: runner.os == 'Windows'
run: |
Set-Location -Path ..\out\Scalar.GitInstaller
Write-Host 'Uninstalling Git ...'
foreach ($file in Get-ChildItem 'C:\Program Files\Git' -Recurse -File -Include 'unins*.exe') {
& $file.Fullname /VERYSILENT /SUPPRESSMSGBOXES /NORESTART
Wait-Process -Name $file.Basename
}
Remove-Item 'C:\Program Files\Git' -Recurse -Force
Write-Host 'Installing GitForWindows ...'
$files = Get-ChildItem . -Recurse -File -Include 'Git-*.vfs.*.exe'
& $files[0].Fullname /DIR="C:\Program Files\Git" /NOICONS /COMPONENTS="ext,ext\shellhere,ext\guihere,assoc,assoc_sh,scalar" /GROUP="Git" /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /ALLOWDOWNGRADE=1 /LOG=install.log
Wait-Process $files[0].Basename
Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\GitForWindows'

- name: Configure feature.scalar
run: git config --global feature.scalar ${{ matrix.features }}

- id: functional_test
name: Functional test
shell: bash
run: |
export GIT_TRACE2_EVENT="$PWD/$TRACE2_BASENAME/Event"
export GIT_TRACE2_PERF="$PWD/$TRACE2_BASENAME/Perf"
export GIT_TRACE2_EVENT_BRIEF=true
export GIT_TRACE2_PERF_BRIEF=true
mkdir -p "$TRACE2_BASENAME"
mkdir -p "$TRACE2_BASENAME/Event"
mkdir -p "$TRACE2_BASENAME/Perf"
git version --build-options
cd ../out
Scalar.FunctionalTests/$BUILD_FRAGMENT/Scalar.FunctionalTests$BUILD_FILE_EXT --full-suite

- id: trace2_zip_unix
if: runner.os != 'Windows' && ( success() || failure() ) && ( steps.functional_test.conclusion == 'success' || steps.functional_test.conclusion == 'failure' )
name: Zip Trace2 Logs (Unix)
shell: bash
run: zip -q -r $TRACE2_BASENAME.zip $TRACE2_BASENAME/

- id: trace2_zip_windows
if: runner.os == 'Windows' && ( success() || failure() ) && ( steps.functional_test.conclusion == 'success' || steps.functional_test.conclusion == 'failure' )
name: Zip Trace2 Logs (Windows)
run: Compress-Archive -DestinationPath ${{ env.TRACE2_BASENAME }}.zip -Path ${{ env.TRACE2_BASENAME }}

- name: Archive Trace2 Logs
if: ( success() || failure() ) && ( steps.trace2_zip_unix.conclusion == 'success' || steps.trace2_zip_windows.conclusion == 'success' )
uses: actions/upload-artifact@v2
with:
name: ${{ env.TRACE2_BASENAME }}.zip
path: ${{ env.TRACE2_BASENAME }}.zip
retention-days: 3
43 changes: 0 additions & 43 deletions Scalar.FunctionalTests/Tests/GitCommands/AddStageTests.cs

This file was deleted.

104 changes: 0 additions & 104 deletions Scalar.FunctionalTests/Tests/GitCommands/CherryPickConflictTests.cs

This file was deleted.

45 changes: 0 additions & 45 deletions Scalar.FunctionalTests/Tests/GitCommands/DeleteEmptyFolderTests.cs

This file was deleted.

31 changes: 0 additions & 31 deletions Scalar.FunctionalTests/Tests/GitCommands/EnumerationMergeTest.cs

This file was deleted.

Loading
Loading