Comment out unused test categories and authentication tests for code … #5
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: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Set up Docker Compose | |
| uses: docker/setup-compose-action@v1 | |
| - name: Start Docker Compose services | |
| working-directory: ./NullOpsDevs.LibSsh.Test | |
| run: docker compose up -d | |
| - name: Setup SSH Agent | |
| run: | | |
| eval $(ssh-agent -s) | |
| echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> $GITHUB_ENV | |
| echo "SSH_AGENT_PID=$SSH_AGENT_PID" >> $GITHUB_ENV | |
| ssh-add NullOpsDevs.LibSsh.Test/docker/test-keys/id_rsa | |
| - name: Build test project (Release) | |
| run: dotnet build -c Release --self-contained -r linux-x64 ./NullOpsDevs.LibSsh.Test/NullOpsDevs.LibSsh.Test.csproj | |
| - name: Run tests | |
| working-directory: ./NullOpsDevs.LibSsh.Test/bin/Release/net9.0/linux-x64/ | |
| run: ./NullOpsDevs.LibSsh.Test | |
| - name: Cleanup Docker Compose | |
| if: always() | |
| working-directory: ./NullOpsDevs.LibSsh.Test | |
| run: docker compose down -v |