haf / expecto

A smooth testing lib for F#. APIs made for humans! Strong testing methodologies for everyone!
Apache License 2.0
663 stars 96 forks source link

Fix flipped/mixed up Expecto.Diff formatting #420

Closed lydell closed 3 years ago

lydell commented 3 years ago

Fixes https://github.com/haf/expecto/issues/419

I tested this by running dotnet run --project Expecto.Sample --framework net5.0 in this repo.

First, the default output for comparison:

image

Notes:

Then, the Expecto.Diff output:

image

Notes:

Finally, the output with this PR:

image

Notes:

lydell commented 3 years ago

@haf Friendly ping :) Small change, great quality of life improvement

haf commented 3 years ago

Ah sorry, haven't seen this. Thanks @lydell !

lydell commented 3 years ago

Thanks! What’s the plan for the next release? Is it days, weeks, months? Easier to wait for something good when you’ve got a rough estimate of the time frame 🙏

olivercoad commented 2 years ago

@haf Any chance you could push an update to nuget some time?

haf commented 2 years ago

@olivercoad Just a lot to do every day. Could you help me get this auto-publishing with Github Actions? I'd happily add in secrets and such to the repo so that it can work.

haf commented 2 years ago

I've added the secret NUGET_RELEASE_KEY that we can use to push new nugets on every commit to master. (And let's rename it to main while we're at it!)

olivercoad commented 2 years ago

No worries. Thanks for setting up the secret, I'll try and have a look at how to get auto-publishing working.

olivercoad commented 2 years ago

push new nugets on every commit to master

I'm guessing something like this would do that (looking at https://docs.github.com/en/actions/guides/building-and-testing-net#publishing-to-package-registries)

name: Publish Nuget Packages
on:
  push:
    branches: [ main ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Setup .Net
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: "5.0"
      env:
        NUGET_TOKEN: ${{secrets.NUGET_RELEASE_KEY}}
    - run: ./fake build --target Push

Though you'd probably want some kind of manual action so it it only pushes when you change the version number or something.

baronfel commented 2 years ago

you can also do manual job runs, which we do in fsautocomplete:

on:
  workflow_dispatch:
    inputs:
      username:
        description: Github username of the person triggering the release
        default: "baronfel"
        required: true
      email:
        description: Email of the person triggering the release
        default: "some_email@place.com"
        required: true

these can be referenced in subsequent steps, or you can leave them out entirely to require a manual job. in either case only users with write access can trigger them.

haf commented 2 years ago

I'm happy with any solution that gives me more time.

Every time I run ./fake build --target Push that target fails for unspecified reasons and I have to manually push everything with the shell script line that is a comment in the fsx file.

haf commented 2 years ago

I changed the script like you suggested @olivercoad