Skip to content

Commit

Permalink
build: migrate from appveyor (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
omsmith committed Nov 21, 2023
1 parent 8598b85 commit 49301a7
Show file tree
Hide file tree
Showing 8 changed files with 108 additions and 98 deletions.
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ci-version-properties": {
"version": "0.4.0",
"commands": [
"dotnet-ci-version-properties"
]
}
}
}
68 changes: 51 additions & 17 deletions .github/workflows/ci.yml
@@ -1,17 +1,51 @@
name: Build and test
on:
pull_request:
push:
branches: master
jobs:
test:
name: Build and test
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: Brightspace/third-party-actions@actions/checkout
- uses: Brightspace/third-party-actions@actions/setup-dotnet
- name: Unit tests
run: dotnet test -c Release --framework net60 test/D2L.Security.OAuth2.UnitTests/D2L.Security.OAuth2.UnitTests.csproj
- name: Integration tests
run: dotnet test -c Release --framework net60 test/D2L.Security.OAuth2.IntegrationTests/D2L.Security.OAuth2.IntegrationTests.csproj
name: CI

on:
pull_request:
push:
branches: master
tags:
- v*

env:
VERSION_PREFIX: 12.3.2

jobs:

linux:
name: Build and test (Linux)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: Brightspace/third-party-actions@actions/checkout
- uses: Brightspace/third-party-actions@actions/setup-dotnet

- name: Unit tests
run: dotnet test -c Release --framework net60 test/D2L.Security.OAuth2.UnitTests/D2L.Security.OAuth2.UnitTests.csproj
- name: Integration tests
run: dotnet test -c Release --framework net60 test/D2L.Security.OAuth2.IntegrationTests/D2L.Security.OAuth2.IntegrationTests.csproj

windows:
name: Build and test (Windows)
runs-on: windows-latest
timeout-minutes: 10

steps:
- uses: Brightspace/third-party-actions@actions/checkout
- uses: Brightspace/third-party-actions@actions/setup-dotnet

- run: dotnet tool restore
- name: Generate version properties
run: dotnet ci-version-properties --output VersionInfo.props && cat VersionInfo.props

- name: Build
run: dotnet build -c Release

- name: Test
run: dotnet test -c Release --no-build

- name: Archive
uses: Brightspace/third-party-actions@actions/upload-artifact
with:
name: D2L.Security.OAuth2.${{ github.sha }}
path: src/**/*.symbols.nupkg
1 change: 0 additions & 1 deletion D2L.Security.OAuth2.sln
Expand Up @@ -27,7 +27,6 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A39E5923-3238-4E59-9E65-45EB5BA2ED19}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
appveyor.yml = appveyor.yml
Directory.Build.props = Directory.Build.props
Packages.props = Packages.props
EndProjectSection
Expand Down
14 changes: 2 additions & 12 deletions Directory.Build.props
@@ -1,4 +1,6 @@
<Project>
<Import Project="VersionInfo.props" />

<PropertyGroup>
<Authors>D2L</Authors>
<Company>D2L Corporation</Company>
Expand All @@ -9,18 +11,6 @@
<PackageProjectUrl>https://github.com/Brightspace/D2L.Security.OAuth2</PackageProjectUrl>
</PropertyGroup>

<PropertyGroup Condition="'$(APPVEYOR)' == 'true'">
<AssemblyVersion>$(ASSEMBLY_VERSION)</AssemblyVersion>
<FileVersion>$(ASSEMBLY_VERSION).$(APPVEYOR_BUILD_NUMBER)</FileVersion>
<VersionPrefix>$(ASSEMBLY_VERSION).$(APPVEYOR_BUILD_NUMBER)</VersionPrefix>
<VersionSuffix Condition="'$(APPVEYOR_REPO_TAG)' == 'false' And '$(APPVEYOR_PULL_REQUEST_NUMBER)' == ''">rc</VersionSuffix>
<VersionSuffix Condition="'$(APPVEYOR_PULL_REQUEST_NUMBER)' != ''">alpha</VersionSuffix>
</PropertyGroup>

<PropertyGroup Condition="'$(APPVEYOR)' != 'true'">
<Version>0.0.0-localdev</Version>
</PropertyGroup>

<PropertyGroup>
<LangVersion>11.0</LangVersion>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
Expand Down
4 changes: 2 additions & 2 deletions Directory.Packages.props
Expand Up @@ -11,8 +11,8 @@
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageVersion Include="Moq" Version="4.18.1" />
<PackageVersion Include="Newtonsoft.Json" Version="[6.0.8,7)" />
<PackageVersion Include="NUnit" Version="3.13.3" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageVersion Include="NUnit" Version="3.14.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="RichardSzalay.MockHttp" Version="6.0.0" />
<PackageVersion Include="SimpleLogInterface" Version="3.0.1" />
<PackageVersion Include="System.Collections.Immutable" Version="6.0.0" />
Expand Down
74 changes: 36 additions & 38 deletions README.md
@@ -1,38 +1,36 @@
# D2L.Security.OAuth2

[![Build status](https://ci.appveyor.com/api/projects/status/id5byt9yitcek417/branch/master?svg=true)](https://ci.appveyor.com/project/Brightspace/d2l-security-oauth2/branch/master)

.NET libraries for integrating with Brightspace OAuth 2.0. These libraries implement D2L-specific functionality (like validating access tokens, manipulating scope, etc.) and the `jwt-bearer` grant. Most third-party users should use a cross-platform OAuth 2.0 library of their choosing (see the "Client Libraries" section on [this page](https://oauth.net/code/) for examples.)

## Libraries

The libraries in this repository are published in lock-step. It is recommended that you maintain a consistent version number on any of these that you depend on. Mixing versions as of the version 5.0 release is not supported.

### D2L.Security.OAuth2
[![NuGet](https://img.shields.io/nuget/v/D2L.Security.OAuth2.svg?maxAge=7200)](https://www.nuget.org/packages/D2L.Security.OAuth2/)

Core functionality for request validation and token provisioning.

### D2L.Security.OAuth2.WebApi
[![NuGet](https://img.shields.io/nuget/v/D2L.Security.OAuth2.WebApi.svg?maxAge=7200)](https://www.nuget.org/packages/D2L.Security.OAuth2.WebApi/)

WebAPI integration in the form of filters/attributes/etc.

### D2L.Security.OAuth2.TestFramework
[![NuGet](https://img.shields.io/nuget/v/D2L.Security.OAuth2.TestFramework.svg?maxAge=7200)](https://www.nuget.org/packages/D2L.Security.OAuth2.TestFramework/)

Helper library for writing tests.

## Contributing

1. **Fork** the repository. Committing directly against this repository is
highly discouraged.

2. Make your modifications in a branch, updating and writing new tests.

3. Ensure that all tests pass

4. `rebase` your changes against master. *Do not merge*.

5. Submit a pull request to this repository. Wait for tests to run and someone
to chime in.
# D2L.Security.OAuth2

.NET libraries for integrating with Brightspace OAuth 2.0. These libraries implement D2L-specific functionality (like validating access tokens, manipulating scope, etc.) and the `jwt-bearer` grant. Most third-party users should use a cross-platform OAuth 2.0 library of their choosing (see the "Client Libraries" section on [this page](https://oauth.net/code/) for examples.)

## Libraries

The libraries in this repository are published in lock-step. It is recommended that you maintain a consistent version number on any of these that you depend on. Mixing versions as of the version 5.0 release is not supported.

### D2L.Security.OAuth2
[![NuGet](https://img.shields.io/nuget/v/D2L.Security.OAuth2.svg?maxAge=7200)](https://www.nuget.org/packages/D2L.Security.OAuth2/)

Core functionality for request validation and token provisioning.

### D2L.Security.OAuth2.WebApi
[![NuGet](https://img.shields.io/nuget/v/D2L.Security.OAuth2.WebApi.svg?maxAge=7200)](https://www.nuget.org/packages/D2L.Security.OAuth2.WebApi/)

WebAPI integration in the form of filters/attributes/etc.

### D2L.Security.OAuth2.TestFramework
[![NuGet](https://img.shields.io/nuget/v/D2L.Security.OAuth2.TestFramework.svg?maxAge=7200)](https://www.nuget.org/packages/D2L.Security.OAuth2.TestFramework/)

Helper library for writing tests.

## Contributing

1. **Fork** the repository. Committing directly against this repository is
highly discouraged.

2. Make your modifications in a branch, updating and writing new tests.

3. Ensure that all tests pass

4. `rebase` your changes against master. *Do not merge*.

5. Submit a pull request to this repository. Wait for tests to run and someone
to chime in.
5 changes: 5 additions & 0 deletions VersionInfo.props
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<Version>0.0.0-dev</Version>
</PropertyGroup>
</Project>
28 changes: 0 additions & 28 deletions appveyor.yml

This file was deleted.

0 comments on commit 49301a7

Please sign in to comment.