Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial attempt at building/testing/publishing under linux #196

Merged
merged 10 commits into from
Dec 28, 2020

Conversation

connorworley
Copy link
Contributor

@connorworley connorworley commented Dec 23, 2020

Checklist

General Contributing

  • Have you read the Code of Conduct and signed the CLA?

Is This a Code Change?

  • Non-code related change (markdown/git settings etc)
  • SDK Code Change
  • Example/Test Code Change

Validation

  • Does this code build successfully?
  • Do all tests pass?
  • Does Stylecop pass?

This is my first attempt at getting the workflow for this SDK fully running on Linux. There are several changes.

  • .NET Framework 4.5 support is dropped in favor of solely targeting .NET Standard 2.0.
  • CI now runs on both Windows and Linux.
  • Publishing now runs on Linux.
  • The version number has been removed from the repo. GitHub Actions will publish with whatever number is used when a new release is created.
  • A few .csproj files have been rewritten. These files contained a lot of VS cruft that we don't care about if we're developing on Linux.
  • A few scripts have been changed.
  • The generator Python scripts have been automatically upgraded for Python 3 compatibility.
  • Unit tests now generate code coverage reports.

@codecov
Copy link

codecov bot commented Dec 23, 2020

Codecov Report

❗ No coverage uploaded for pull request base (main@de96458). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #196   +/-   ##
=======================================
  Coverage        ?   10.99%           
=======================================
  Files           ?       14           
  Lines           ?     1428           
  Branches        ?        0           
=======================================
  Hits            ?      157           
  Misses          ?     1271           
  Partials        ?        0           
Flag Coverage Δ
unit 10.99% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de96458...cc42447. Read the comment docs.

.github/workflows/ci.yml Show resolved Hide resolved
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<TargetFrameworkProfile />
<TargetFramework>net5.0</TargetFramework>
Copy link
Contributor

Choose a reason for hiding this comment

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

I thought we planned to support netstandard2.0? Is there a reason we want this on net5.0? I believe net is just the .NET Framework or is it .NET Core?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is .NET Core, the naming is weird for 5 onwards. I ran into issues with setting up the tests when targeting the standard and figure targeting a specific core version is fine since this is a dev-only change.

generator/run_this.py Show resolved Hide resolved
scripts/generate_stone.ps1 Outdated Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
<ItemGroup>
<None Include="dropbox.runsettings" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to specify that this csproj is for tests? Or does it know based on these imports? I see above line 18 is where we specified it before but not sure if that is still needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the thing in the old file was just a hint for the IDE? I can add it back, but in theory we can dotnet test any of these csproj files without any extra metadata.

dropbox-sdk-dotnet/Dropbox.Api/Dropbox.Api.csproj Outdated Show resolved Hide resolved
generator/csharp.py Show resolved Hide resolved
@connorworley connorworley requested a review from rogebrd December 24, 2020 00:27
@connorworley connorworley mentioned this pull request Dec 24, 2020
7 tasks
Copy link
Contributor

@rogebrd rogebrd left a comment

Choose a reason for hiding this comment

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

Looks all good to me! Glad to see were cleaning up a lot of the code

@connorworley connorworley merged commit 02beced into main Dec 28, 2020
@connorworley connorworley deleted the linux_build branch December 28, 2020 21:59
connorworley added a commit that referenced this pull request Jan 4, 2021
* #193 Fix InvalidCastException

1. Turn off DateTime parsing by JsonTextReader
2. Perform parsing in DateTimeDecoder using the same Culture and DateTimeKind.
3. Added tests to verify the behavior.

* Initial attempt at building/testing/publishing under linux (#196)

* Initial attempt at building/testing/publishing under linux

* replace backslash with forwardslash

* Attempt to add unit test coverage reports

* try to fix gh actions syntax error

* try to fix gh actions syntax error again

* try to fix conditional expression for publishing coverage

* try to fix conditional expression for publishing coverage again

* only run CI on ubuntu

* PR feedback

* no multi-line run directives on windows

Co-authored-by: Connor Worley <cworley@dropbox.com>

* Bump peter-evans/create-pull-request from v3.4.1 to v3.6.0 (#198)

Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from v3.4.1 to v3.6.0.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](peter-evans/create-pull-request@v3.4.1...45c510e)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/setup-python from v2.1.4 to v2.2.1 (#195)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from v2.1.4 to v2.2.1.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v2.1.4...3105fb1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump codecov/codecov-action from v1.0.15 to v1.1.1 (#201)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.15 to v1.1.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](codecov/codecov-action@v1.0.15...1fc7722)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* #193 Fix InvalidCastException

1. Turn off DateTime parsing by JsonTextReader
2. Perform parsing in DateTimeDecoder using the same Culture and DateTimeKind.
3. Added tests to verify the behavior.

Co-authored-by: Connor Worley <connorbworley@gmail.com>
Co-authored-by: Connor Worley <cworley@dropbox.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
connorworley added a commit that referenced this pull request Jan 4, 2021
* #193 Fix InvalidCastException

1. Turn off DateTime parsing by JsonTextReader
2. Perform parsing in DateTimeDecoder using the same Culture and DateTimeKind.
3. Added tests to verify the behavior.

* Initial attempt at building/testing/publishing under linux (#196)

* Initial attempt at building/testing/publishing under linux

* replace backslash with forwardslash

* Attempt to add unit test coverage reports

* try to fix gh actions syntax error

* try to fix gh actions syntax error again

* try to fix conditional expression for publishing coverage

* try to fix conditional expression for publishing coverage again

* only run CI on ubuntu

* PR feedback

* no multi-line run directives on windows

Co-authored-by: Connor Worley <cworley@dropbox.com>

* Bump peter-evans/create-pull-request from v3.4.1 to v3.6.0 (#198)

Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from v3.4.1 to v3.6.0.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](peter-evans/create-pull-request@v3.4.1...45c510e)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/setup-python from v2.1.4 to v2.2.1 (#195)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from v2.1.4 to v2.2.1.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v2.1.4...3105fb1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump codecov/codecov-action from v1.0.15 to v1.1.1 (#201)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.15 to v1.1.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](codecov/codecov-action@v1.0.15...1fc7722)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* #193 Fix InvalidCastException

1. Turn off DateTime parsing by JsonTextReader
2. Perform parsing in DateTimeDecoder using the same Culture and DateTimeKind.
3. Added tests to verify the behavior.

Co-authored-by: Connor Worley <connorbworley@gmail.com>
Co-authored-by: Connor Worley <cworley@dropbox.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
rogebrd pushed a commit that referenced this pull request Apr 27, 2022
* Initial attempt at building/testing/publishing under linux

* replace backslash with forwardslash

* Attempt to add unit test coverage reports

* try to fix gh actions syntax error

* try to fix gh actions syntax error again

* try to fix conditional expression for publishing coverage

* try to fix conditional expression for publishing coverage again

* only run CI on ubuntu

* PR feedback

* no multi-line run directives on windows

Co-authored-by: Connor Worley <cworley@dropbox.com>
rogebrd pushed a commit that referenced this pull request Apr 27, 2022
* #193 Fix InvalidCastException

1. Turn off DateTime parsing by JsonTextReader
2. Perform parsing in DateTimeDecoder using the same Culture and DateTimeKind.
3. Added tests to verify the behavior.

* Initial attempt at building/testing/publishing under linux (#196)

* Initial attempt at building/testing/publishing under linux

* replace backslash with forwardslash

* Attempt to add unit test coverage reports

* try to fix gh actions syntax error

* try to fix gh actions syntax error again

* try to fix conditional expression for publishing coverage

* try to fix conditional expression for publishing coverage again

* only run CI on ubuntu

* PR feedback

* no multi-line run directives on windows

Co-authored-by: Connor Worley <cworley@dropbox.com>

* Bump peter-evans/create-pull-request from v3.4.1 to v3.6.0 (#198)

Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from v3.4.1 to v3.6.0.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](peter-evans/create-pull-request@v3.4.1...45c510e)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/setup-python from v2.1.4 to v2.2.1 (#195)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from v2.1.4 to v2.2.1.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v2.1.4...3105fb1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump codecov/codecov-action from v1.0.15 to v1.1.1 (#201)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.15 to v1.1.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](codecov/codecov-action@v1.0.15...1fc7722)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* #193 Fix InvalidCastException

1. Turn off DateTime parsing by JsonTextReader
2. Perform parsing in DateTimeDecoder using the same Culture and DateTimeKind.
3. Added tests to verify the behavior.

Co-authored-by: Connor Worley <connorbworley@gmail.com>
Co-authored-by: Connor Worley <cworley@dropbox.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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