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

GitHub Actions CI #224

Merged
merged 7 commits into from
Apr 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 0 additions & 84 deletions .azure-pipelines/build-template.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .azure-pipelines/build.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ To contribute changes (source code, scripts, configuration) to this repository p
1. Fork the `master` branch of this repository from the latest commit.
1. Create a branch from your fork's `master` branch to help isolate your changes from any further work on `master`. If fixing an issue try to reference its name in your branch name (e.g. `issue-123`) to make changes easier to track the changes.
1. Work on your proposed changes on your fork. If you are fixing an issue include at least one unit test that reproduces it if the code changes to fix it have not been applied; if you are adding new functionality please include unit tests appropriate to the changes you are making. The [code coverage figure](https://codecov.io/gh/martincostello/sqllocaldb) should be maintained where possible.
1. When you think your changes are complete, test that the code builds cleanly using `Build.ps1`/`build.sh`. There should be no compiler warnings and all tests should pass.
1. When you think your changes are complete, test that the code builds cleanly using `build.ps1`. There should be no compiler warnings and all tests should pass.
1. Once your changes build cleanly locally submit a Pull Request back to the `master` branch from your fork's branch. Ideally commits to your branch should be squashed before creating the Pull Request. If the Pull Request fixes an issue please reference it in the title and/or description. Please keep changes focused around a specific topic rather than include multiple types of changes in a single Pull Request.
1. After your Pull Request is created it will build against the repository's continuous integrations.
1. Once the Pull Request has been reviewed by the project's [contributors](https://github.com/martincostello/sqllocaldb/graphs/contributors) and the status checks pass your Pull Request will be merged back to the `master` branch, assuming that the changes are deemed appropriate.
56 changes: 56 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: build

on:
push:
branches: [ master ]
tags: [ v* ]
pull_request:
branches: [ master ]

jobs:
build:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
include:
- os: macos-latest
os_name: macos
- os: ubuntu-latest
os_name: linux
- os: windows-latest
os_name: windows

steps:

- name: Checkout code
uses: actions/checkout@v2

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.201

- name: Build, Test and Package
shell: pwsh
run: ./build.ps1
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
NUGET_XMLDOC_MODE: skip

- uses: codecov/codecov-action@v1
name: Upload coverage to Codecov
with:
file: ./artifacts/coverage.netcoreapp3.1.cobertura.xml
flags: ${{ matrix.os_name }}

- name: Publish artifacts
uses: actions/upload-artifact@v1
with:
name: artifacts-${{ matrix.os_name }}
path: ./artifacts

# TODO Publish NuGet package to feed
35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

13 changes: 8 additions & 5 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@
<Authors>martin_costello</Authors>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)SqlLocalDb.ruleset</CodeAnalysisRuleSet>
<Company>https://github.com/martincostello/sqllocaldb</Company>
<ContinuousIntegrationBuild Condition=" '$(CI)' != '' or '$(GITHUB_ACTIONS)' != '' ">true</ContinuousIntegrationBuild>
<Copyright>Martin Costello (c) 2012-$([System.DateTime]::Now.ToString(yyyy))</Copyright>
<!-- Enable deterministic builds for CI once https://github.com/tonerdo/coverlet/issues/363 fixed -->
<Deterministic>false</Deterministic>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<GenerateGitMetadata Condition=" ('$(CI)' != '' or '$(TF_BUILD)' != '') and '$(GenerateGitMetadata)' == '' ">true</GenerateGitMetadata>
<GenerateGitMetadata Condition=" ('$(CI)' != '' or '$(GITHUB_ACTIONS)' != '') and '$(GenerateGitMetadata)' == '' ">true</GenerateGitMetadata>
<LangVersion>latest</LangVersion>
<NeutralLanguage>en-US</NeutralLanguage>
<NoWarn>$(NoWarn);CA1054;CA2234</NoWarn>
Expand All @@ -41,10 +44,10 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<VersionPrefix>3.0.1</VersionPrefix>
<VersionSuffix Condition=" '$(VersionSuffix)' == '' AND '$(APPVEYOR)' == 'true' AND '$(APPVEYOR_REPO_TAG)' != 'true'">beta$([System.Convert]::ToInt32(`$(APPVEYOR_BUILD_NUMBER)`).ToString(`0000`))</VersionSuffix>
<VersionSuffix Condition=" '$(VersionSuffix)' == '' AND '$(TF_BUILD)' == 'True'">beta$([System.Convert]::ToInt32(`$(BUILD_BUILDID)`).ToString(`0000`))</VersionSuffix>
<VersionSuffix Condition=" '$(VersionSuffix)' == '' AND '$(TRAVIS)' == 'true'">beta$([System.Convert]::ToInt32(`$(TRAVIS_BUILD_NUMBER)`).ToString(`0000`))</VersionSuffix>
<VersionSuffix Condition=" '$(APPVEYOR_REPO_TAG)' == 'true' AND '$(APPVEYOR_REPO_TAG_NAME)' != '' AND '$(APPVEYOR_REPO_TAG_NAME.Contains(`-`))' == 'true' ">$(APPVEYOR_REPO_TAG_NAME.Substring($(APPVEYOR_REPO_TAG_NAME.IndexOf(`-`))).Substring(1))</VersionSuffix>
<VersionSuffix Condition=" '$(VersionSuffix)' == '' AND '$(GITHUB_ACTIONS)' != '' ">beta$([System.Convert]::ToInt32(`$(GITHUB_RUN_NUMBER)`).ToString(`0000`))</VersionSuffix>
<VersionPrefix Condition=" $(GITHUB_REF.StartsWith(`refs/tags/v`)) ">$(GITHUB_REF.Replace('refs/tags/v', ''))</VersionPrefix>
<VersionSuffix Condition=" $(GITHUB_REF.StartsWith(`refs/tags/v`)) "></VersionSuffix>
<FileVersion Condition=" '$(GITHUB_RUN_NUMBER)' != '' ">$(VersionPrefix).$(GITHUB_RUN_NUMBER)</FileVersion>
</PropertyGroup>
<PropertyGroup>
<CollectCoverage>true</CollectCoverage>
Expand Down
19 changes: 13 additions & 6 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<Project>
<PropertyGroup>
<CommitBranch Condition=" '$(CommitBranch)' == '' ">$(APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH)</CommitBranch>
<CommitBranch Condition=" '$(CommitBranch)' == '' ">$(APPVEYOR_REPO_BRANCH)</CommitBranch>
<CommitBranch Condition=" '$(CommitBranch)' == '' ">$(BUILD_SOURCEBRANCHNAME)</CommitBranch>
<CommitBranch Condition=" '$(CommitBranch)' == '' ">$(TRAVIS_PULL_REQUEST_BRANCH)</CommitBranch>
<CommitBranch Condition=" '$(CommitBranch)' == '' ">$(TRAVIS_BRANCH)</CommitBranch>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<CommitBranch Condition=" '$(CommitBranch)' == '' and '$(GITHUB_REF)' != '' ">$(GITHUB_REF.Substring(11))</CommitBranch>
<CommitHash Condition=" '$(CommitHash)' == '' ">$(GITHUB_SHA)</CommitHash>
</PropertyGroup>
<Target Name="AddGitMetadaAssemblyAttributes"
BeforeTargets="CoreGenerateAssemblyInfo"
Expand All @@ -31,4 +27,15 @@
</AssemblyAttribute>
</ItemGroup>
</Target>
<!--
Note: the .NET SDK is impacted by a bug that prevents the resulting builds from being
treated as deterministic. To work around this bug, AssemblyInfo.cs is manually added.
Visit https://github.com/dotnet/sourcelink/issues/572 for more information.
-->
<PropertyGroup>
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)" />
</ItemGroup>
</Project>
12 changes: 4 additions & 8 deletions SqlLocalDb.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
.gitattributes = .gitattributes
.gitignore = .gitignore
.travis.yml = .travis.yml
appveyor.yml = appveyor.yml
Build.ps1 = Build.ps1
build.sh = build.sh
build.ps1 = build.ps1
CHANGELOG = CHANGELOG
CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md
CommonAssemblyInfo.cs = CommonAssemblyInfo.cs
Expand Down Expand Up @@ -59,10 +56,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoApp", "samples\TodoApp\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoApp.Tests", "samples\TodoApp.Tests\TodoApp.Tests.csproj", "{5B2AD682-C000-45D0-AECE-8DADED1616B7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".azure-pipelines", ".azure-pipelines", "{CB75AAE3-CB43-44D7-A0C1-0FD8D21CD968}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{B3D6F0CC-F49F-424E-B853-FFB0626A38D0}"
ProjectSection(SolutionItems) = preProject
.azure-pipelines\build-template.yml = .azure-pipelines\build-template.yml
.azure-pipelines\build.yml = .azure-pipelines\build.yml
.github\workflows\build.yml = .github\workflows\build.yml
EndProjectSection
EndProject
Global
Expand Down Expand Up @@ -103,7 +99,7 @@ Global
{701E574A-6366-4AF9-9319-237968FA1089} = {E207A447-68A1-4D72-B24F-89FB7890AE12}
{1B720E31-3AA8-4010-A3DB-187B2D0BC471} = {825D6F08-8321-4C6E-92A9-92543FDAF965}
{5B2AD682-C000-45D0-AECE-8DADED1616B7} = {825D6F08-8321-4C6E-92A9-92543FDAF965}
{CB75AAE3-CB43-44D7-A0C1-0FD8D21CD968} = {E207A447-68A1-4D72-B24F-89FB7890AE12}
{B3D6F0CC-F49F-424E-B853-FFB0626A38D0} = {D0426D09-1FF8-4E1F-A9AF-38DDEE5D7CCA}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3B9E157C-5E92-4357-B233-281B4530EABD}
Expand Down
40 changes: 0 additions & 40 deletions appveyor.yml

This file was deleted.

Loading