Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Remove Travis and use Github Actions #228

Merged
merged 43 commits into from Nov 23, 2019
Merged

Remove Travis and use Github Actions #228

merged 43 commits into from Nov 23, 2019

Conversation

erikzhang
Copy link
Member

@erikzhang erikzhang commented Nov 22, 2019

  1. Automatically run unit tests and integrate with coveralls.io to collect code coverage information.
  2. Automatically run dotnet format.
  3. Pack and publish master branch to both Github Packages and MyGet. Also support for MyGet's symbol server.

lock9
lock9 previously approved these changes Nov 22, 2019
Copy link
Contributor

@lock9 lock9 left a comment

Choose a reason for hiding this comment

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

It builds the project successfully without testing.

@erikzhang
Copy link
Member Author

My plan is to remove Travis.

@erikzhang
Copy link
Member Author

@neo-project/core Can we remove Travis now?

@shargon
Copy link
Member

shargon commented Nov 22, 2019

We can remove travis, but we need the coverage report too, we can use coveralls.io, i think that is much better.

@erikzhang
Copy link
Member Author

image

Coveralls done. @shargon

@erikzhang erikzhang changed the title Create dotnetcore.yml Remove Travis and use Github Actions Nov 22, 2019
shargon
shargon previously approved these changes Nov 22, 2019
Copy link
Member

@shargon shargon left a comment

Choose a reason for hiding this comment

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

I love it!

vncoelho
vncoelho previously approved these changes Nov 22, 2019
Copy link
Member

@vncoelho vncoelho left a comment

Choose a reason for hiding this comment

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

Genious!

@erikzhang erikzhang dismissed stale reviews from vncoelho and shargon via fecc572 November 22, 2019 16:26
@devhawk
Copy link
Contributor

devhawk commented Nov 22, 2019

Not for this PR, but are we also going to look at using GitHub package registry instead of myget?

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.0.100
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of hard coding this in the yaml file where it only affects the build system, we should put this in a global.json file. I'm guessing there's a GH Action to pull the dotnet-version from global.json.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can't find a way right now. Maybe we improve it later.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

The Github Actions doesn't support it. https://github.com/actions/setup-dotnet#usage

- name: Setup NuGet.exe for use with actions
uses: NuGet/setup-nuget@v1
- name: Pack with dotnet
run: dotnet pack -c Debug -o out --include-source --version-suffix CI$(date +%s)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should you also --include-symbols?

Copy link
Member Author

@erikzhang erikzhang Nov 23, 2019

Choose a reason for hiding this comment

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

I found that if you add --include-source, there is no difference between adding or not adding --include-symbols.

- name: Setup NuGet.exe for use with actions
uses: NuGet/setup-nuget@v1
- name: Pack with dotnet
run: dotnet pack -c Debug -o out --include-source --version-suffix CI$(date +%s)
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of --include-source, consider using sourceLink

Copy link
Member Author

Choose a reason for hiding this comment

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

I think with --include-source we have the same effect.

@erikzhang
Copy link
Member Author

@neo-project/core @devhawk Ready to merge.


<PropertyGroup>
<Copyright>2016-2019 The Neo Project</Copyright>
<AssemblyTitle>Neo.VM</AssemblyTitle>
<Description>Neo.VM</Description>
<Version>3.0.0-preview1</Version>
<VersionPrefix>3.0.0</VersionPrefix>
Copy link
Contributor

Choose a reason for hiding this comment

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

@devhawk I agree with you that we could use Nerdbank, but I think this may be outside the scope of this PR.

@lock9 lock9 merged commit 0ea7cee into master Nov 23, 2019
@lock9 lock9 deleted the github-actions branch November 23, 2019 21:39
- name: Setup NuGet.exe for use with actions
uses: NuGet/setup-nuget@v1
- name: Pack with dotnet
run: git rev-list --count HEAD |xargs printf "CI%05d" |xargs dotnet pack -c Debug -o out --include-source --version-suffix
Copy link
Contributor

Choose a reason for hiding this comment

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

using the git rev-list count is an improvement on using timestamp. However, it does mean that different branches can end up with the same version suffix. NerdBank gitversion solves this issue by including the commit hash in the version info for branches other than master + releases

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @devhawk, maybe you could create an issue to discuss this tool? I saw your 'thumbs up' on Erik's comment and considered it your approval 😅 .

Copy link
Member Author

Choose a reason for hiding this comment

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

Currently we only build and publish the master branch. So there is no reason to include the commit hash in the version info.

@devhawk
Copy link
Contributor

devhawk commented Nov 23, 2019

@devhawk I agree with you that we could use Nerdbank, but I think this may be outside the scope of this PR.

That seems like more work, vs. just setting NBGV up now and being done with it. But if that's the approach core dev wants to take, it's fine by me.

@lock9
Copy link
Contributor

lock9 commented Nov 23, 2019

I think the core dev approach is to make the best decision for the project. In fact, if 2 PRs will have the same height, we need to change this.

@erikzhang
Copy link
Member Author

Currently we only build and publish on the master branch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants