Skip to content

Implement CI builds for PRs #14822

Closed
Closed

Description

@BillWagner

This is step 2. It would optimize PR builds so that only those projects / solutions that are effected by a change would be built.

Activity

  1. added this to the October 2019 milestone on Sep 30, 2019
  2. removed this from the December 2019 milestone on Dec 2, 2019
  3. 2 remaining items

  4. added this to the January 2020 milestone on Jan 2, 2020
  5. Youssef1313 commented on Jan 5, 2020

    @Youssef1313
    Member

    @BillWagner, just a small note:

    https://github.com/dotnet/samples/blob/master/snippets/csharp/tutorials/attributes/Program.cs#L134

    Things like that, which are intended compile errors, will cause the CI build to fail.

        // <AttributeGotcha2>
        [Gotcha(new Foo(), "test")] // does not compile
        public class AttributeFail
        {
    
        }
        // </AttributeGotcha2>

    A solution will be needed for that.

  6. BillWagner commented on Jan 6, 2020

    @BillWagner
    MemberAuthor

    @Youssef1313 We have thought about it, but haven't decided on a plan yet. We're think through two approaches:

    1. Mark some samples where "a successful CI build" has the expected errors.
    2. Move non-compiling samples into inline code, where it isn't built by the CI system.

    The advantage of the second is that it's easy. The advantage of the first is that if any new language updates change the expected error or add syntax, the CI system would find those for us.

    /cc @Thraka

  7. Thraka commented on Jan 9, 2020

    @Thraka
    Contributor

    I think 2 is the better way to go here.

  8. Youssef1313 commented on Jan 9, 2020

    @Youssef1313
    Member

    Well, If I found samples that has an intended compile-time error, should I open a PR that adds it directly in the md file and deletes it from samples repo ?
    Or wait for this until the CI is done ?

  9. BillWagner commented on Jan 9, 2020

    @BillWagner
    MemberAuthor

    @Youssef1313 We should be deciding which option within a few days. I'll update this comment once we've done that.

  10. removed this from the April 2020 milestone on Apr 23, 2020
  11. BillWagner commented on May 4, 2020

    @BillWagner
    MemberAuthor

    Update from meeting with @Thraka on 5/4:

    • The full build should issue a warning on code that's been found in folders without a *.*proj file.
    • The full build should run the scripts to find unreferenced snippet folders. This will help us remove unused code when snippets are updated and moved to the correct folder.
    • PR builds should issue an error on code (in the PR) that is in a folder without a *.*proj file. That forces each PR to ensure that code is in a project that builds.

    Next steps:

    • Update the dotnet/samples CI build to use GitHub actions. Assigned to @Thraka
    • Add the updated GitHub action in dotnet/dotnet-api-docs and dotnet/docs to build snippets. Assigned to @Thraka

    After that, we can consider how to make PRs fail if they introduce a new code failure, but above notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions