temp #91
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| - push | |
| - pull_request | |
| - workflow_dispatch | |
| jobs: | |
| Windows: | |
| runs-on: windows-2025 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # needed for Nerdbank.GitVersioning | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Setup WSL2 | |
| uses: vedantmgoyal9/setup-wsl2@main | |
| - name: Setup SSH Server | |
| shell: wsl-run {0} | |
| run: | | |
| # Add Docker's official GPG key: | |
| apt-get update | |
| apt-get install -y ca-certificates curl | |
| install -m 0755 -d /etc/apt/keyrings | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc | |
| chmod a+r /etc/apt/keyrings/docker.asc | |
| # Add the repository to Apt sources: | |
| echo \ | |
| "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ | |
| $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \ | |
| tee /etc/apt/sources.list.d/docker.list > /dev/null | |
| apt-get update | |
| # Make Docker available on TCP so Windows can connect to it | |
| #echo '{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}' > /etc/docker/daemon.json | |
| # Install Docker | |
| apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin | |
| dockerd & | |
| sleep 10 | |
| docker build -t renci-ssh-tests-server-image -f test/Renci.SshNet.IntegrationTests/Dockerfile test/Renci.SshNet.IntegrationTests/ | |
| docker run --rm -h renci-ssh-tests-server -d -p 2222:22 renci-ssh-tests-server-image | |
| - name: Run Integration Tests .NET Framework | |
| #environment: | |
| # - DOCKER_HOST: localhost:2375 | |
| run: | |
| dotnet test ` | |
| -f net48 ` | |
| --logger "console;verbosity=normal" ` | |
| --logger GitHubActions ` | |
| -p:CollectCoverage=true ` | |
| -p:CoverletOutputFormat=cobertura ` | |
| -p:CoverletOutput=..\..\coverlet\windows_integration_test_net_4_8_coverage.xml ` | |
| test\Renci.SshNet.IntegrationTests\ |