Skip to content

Conversation

@axunonb
Copy link
Collaborator

@axunonb axunonb commented Jan 2, 2025

publish.yml:

  • Triggered manually
  • Explicitly checkes out the main branch and resets to specified tag

daily_build.yml:

  • Triggered manually
  • Builds and publishes current state of main branch to GitHub Packages.
  • Daily build version set to '5.0.0-daily.##' with commit hash included as release notes.

@axunonb axunonb requested a review from minichma January 2, 2025 23:51
@axunonb axunonb force-pushed the pr/gh-publish-actions branch from beeb9aa to 4008371 Compare January 2, 2025 23:57
`publish.yml`:
- Triggered manually
- Explicitly checkes out the main branch and resets to specified tag

`daily_build.yml`:
- Triggered manually
- Builds and publishes current state of main branch to GitHub Packages.
- Daily build version set to '5.0.0-daily.##' with commit hash included as release notes.
@axunonb axunonb force-pushed the pr/gh-publish-actions branch from 4008371 to c0fdfbc Compare January 2, 2025 23:58
/// Find a solution for issue #120 or close forever
/// </summary>
[Test, Ignore("No solution for issue #120 yet", Until = "2024-12-31")]
[Test, Ignore("No solution for issue #120 yet", Until = "2025-02-28")]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we remove this test which is "on hold" since 2016

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this has been fixed in the meantime, maybe with #659. After tweaking the test a little, it seems to succeed:

    /// <summary>
    /// Evaluate relevancy and validity of the request.
    /// Find a solution for issue #120 or close forever
    /// </summary>
    [Test]
    public void EventsWithShareUidsShouldGenerateASingleRecurrenceSet()
    {
        //https://github.com/rianjs/ical.net/issues/120 dated Sep 5, 2016
        const string ical = """
            BEGIN:VCALENDAR
            PRODID:-//Google Inc//Google Calendar 70.9054//EN
            VERSION:2.0
            CALSCALE:GREGORIAN
            METHOD:PUBLISH
            X-WR-CALNAME:Calendar 2
            X-WR-TIMEZONE:Europe/Bucharest
            BEGIN:VEVENT
            DTSTART;TZID=Europe/Bucharest:20160829T110000
            DTEND;TZID=Europe/Bucharest:20160829T163000
            RRULE:FREQ=DAILY
            DTSTAMP:20160901T104339Z
            UID:[email protected]
            CREATED:20160901T104300Z
            DESCRIPTION:
            LAST-MODIFIED:20160901T104311Z
            LOCATION:
            SEQUENCE:1
            STATUS:CONFIRMED
            SUMMARY:testRScuAD
            TRANSP:OPAQUE
            END:VEVENT
            BEGIN:VEVENT
            DTSTART;TZID=Europe/Bucharest:20160901T163000
            DTEND;TZID=Europe/Bucharest:20160901T220000
            DTSTAMP:20160901T104339Z
            UID:[email protected]
            RECURRENCE-ID;TZID=Europe/Bucharest:20160901T110000
            CREATED:20160901T104300Z
            DESCRIPTION:
            LAST-MODIFIED:20160901T104314Z
            LOCATION:
            SEQUENCE:2
            STATUS:CONFIRMED
            SUMMARY:testRScuAD
            TRANSP:OPAQUE
            END:VEVENT
            BEGIN:VEVENT
            DTSTART;TZID=Europe/Bucharest:20160903T070000
            DTEND;TZID=Europe/Bucharest:20160903T123000
            DTSTAMP:20160901T104339Z
            UID:[email protected]
            RECURRENCE-ID;TZID=Europe/Bucharest:20160903T110000
            CREATED:20160901T104300Z
            DESCRIPTION:
            LAST-MODIFIED:20160901T104315Z
            LOCATION:
            SEQUENCE:2
            STATUS:CONFIRMED
            SUMMARY:testRScuAD
            TRANSP:OPAQUE
            END:VEVENT
            END:VCALENDAR
            """;

        var calendar = Calendar.Load(ical);

        //The API should be something like:
        var orderedOccurrences = calendar.GetOccurrences()
            .Take(10)
            .Select(o => o.Period)
            .ToList();

        var expectedSept1Start = new CalDateTime(DateTime.Parse("2016-09-01T16:30:00"), "Europe/Bucharest");
        var expectedSept1End = new CalDateTime(DateTime.Parse("2016-09-01T22:00:00"), "Europe/Bucharest");
        Assert.Multiple(() =>
        {
            Assert.That(orderedOccurrences[3].StartTime, Is.EqualTo(expectedSept1Start));
            Assert.That(orderedOccurrences[3].EndTime, Is.EqualTo(expectedSept1End));
        });

        var expectedSept3Start = new CalDateTime(DateTime.Parse("2016-09-03T07:00:00"), "Europe/Bucharest");
        var expectedSept3End = new CalDateTime(DateTime.Parse("2016-09-03T12:30:00"), "Europe/Bucharest");
        Assert.Multiple(() =>
        {
            Assert.That(orderedOccurrences[5].StartTime, Is.EqualTo(expectedSept3Start));
            Assert.That(orderedOccurrences[5].EndTime, Is.EqualTo(expectedSept3End));
        });
    }

@minichma
Copy link
Collaborator

minichma commented Jan 5, 2025

@axunonb Aside from the test case I commented I don't think I'm the right one to review this PR, as I don't know too much about Actions.

RecurrenceTests.EventsWithShareUidsShouldGenerateASingleRecurrenceSet
Thanks @minichma
@axunonb
Copy link
Collaborator Author

axunonb commented Jan 5, 2025

Thanks for fixing the test!
Actions should do their job. I gave it a try on a fork of the repo.

@axunonb axunonb merged commit 8810072 into ical-org:main Jan 5, 2025
2 checks passed
@axunonb axunonb deleted the pr/gh-publish-actions branch January 5, 2025 15:59
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 5, 2025

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants