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

Commit

Permalink
Remove Travis and use Github Actions (#228)
Browse files Browse the repository at this point in the history
* Create dotnetcore.yml

* dotnet -format

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Remove travis

* Update README.md

* Update and rename dotnetcore.yml to test.yml

* Create dotnetcore.yml

* Update neo-vm.csproj

* Update and rename dotnetcore.yml to publish.yml

* Update publish.yml

* Update publish.yml

* Update publish.yml

* Update publish.yml

* Update test.yml

* Delete publish.yml

* Update and rename test.yml to dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml

* Update dotnetcore.yml
  • Loading branch information
erikzhang authored and lock9 committed Nov 23, 2019
1 parent 29dd183 commit 0ea7cee
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 30 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: .NET Core Test and Publish

on:
push:
branches: master
pull_request:

env:
DOTNET_VERSION: 3.0.100

jobs:

Test:
runs-on: ubuntu-latest
steps:
- name: Chectout
uses: actions/checkout@v1
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Check format
run: |
dotnet tool install --tool-path ./ dotnet-format
./dotnet-format --check --dry-run -v diagnostic
- name: Test
run: |
find tests -name *.csproj | xargs -I % dotnet add % package coverlet.msbuild
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput=${GITHUB_WORKSPACE}/coverage/lcov
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

PublishGithub:
if: github.ref == 'refs/heads/master' && startsWith(github.repository, 'neo-project/')
needs: Test
runs-on: ubuntu-latest
steps:
- name: Chectout
uses: actions/checkout@v1
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- 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
- name: Publish to Github Packages
run: |
nuget source Add -Name "GitHub" -Source "https://nuget.pkg.github.com/neo-project/index.json" -UserName neo-project -Password ${GITHUB_TOKEN}
nuget push out/*.nupkg -Source "GitHub"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

PublishMyGet:
if: github.ref == 'refs/heads/master' && startsWith(github.repository, 'neo-project/')
needs: Test
runs-on: ubuntu-latest
steps:
- name: Chectout
uses: actions/checkout@v1
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- 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
- name: Publish to MyGet
run: dotnet nuget push out/*.nupkg -s https://www.myget.org/F/neo/api/v2/package -k ${MYGET_TOKEN} -ss https://www.myget.org/F/neo/symbols/api/v2/package -sk ${MYGET_TOKEN}
env:
MYGET_TOKEN: ${{ secrets.MYGET_TOKEN }}
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
<a href="https://github.com/neo-project/neo-vm/releases">
<img src="https://badge.fury.io/gh/neo-project%2Fneo-vm.svg" alt="Current neo-vm version.">
</a>
<a href='https://coveralls.io/github/neo-project/neo-vm?branch=master'>
<img src='https://codecov.io/github/neo-project/neo-vm/branch/master/graph/badge.svg'
alt='Current Coverage Status.' />
<a href='https://coveralls.io/github/neo-project/neo-vm'>
<img src='https://coveralls.io/repos/github/neo-project/neo-vm/badge.svg' alt='Coverage Status' />
</a>
<a href="https://github.com/neo-project/neo-vm">
<img src="https://tokei.rs/b1/github/neo-project/neo-vm?category=lines" alt="total lines.">
Expand Down
5 changes: 3 additions & 2 deletions src/neo-vm/neo-vm.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<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>
<VersionSuffix>preview1</VersionSuffix>
<Authors>The Neo Project</Authors>
<TargetFramework>netstandard2.1</TargetFramework>
<AssemblyName>Neo.VM</AssemblyName>
Expand Down

0 comments on commit 0ea7cee

Please sign in to comment.