Skip to content

Commit

Permalink
Publishbuild (#1165)
Browse files Browse the repository at this point in the history
* Added publish build to myget

* Added myget publish and fixed build badge and copyright years
  • Loading branch information
OsirisTerje committed Apr 11, 2024
1 parent f9b355a commit 2b04075
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 17 deletions.
@@ -1,4 +1,5 @@
name: NUnit3TestAdapter.Cake.CI

name: NUnit3TestAdapter.CI

on: [push, pull_request,workflow_dispatch]

Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/NUnit3TestAdapter.Myget.Publish.yml
@@ -0,0 +1,59 @@
name: NUnit3TestAdapter.Myget.Publish

on:
push:
branches:
- main
- master
- release
- 'v3'
- myget
workflow_dispatch:

defaults:
run:
shell: pwsh
jobs:
build-windows:
name: Windows Build
runs-on: windows-latest

steps:
- name: ⤵️ Checkout Source
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 🛠️ Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
7.0.x
8.0.x
- name: 🛠️ Install dotnet tools
run: dotnet tool restore

- name: 🔨 Build
run: dotnet tool run dotnet-cake --configuration=Release

- name: 📦 Package
run: dotnet tool run dotnet-cake --target=Package

- name: 💾 Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: Package
path: package

- name: Publish nupkg and snupkg to Myget.org
run: |
foreach($file in (Get-ChildItem package -Recurse -Include *.nupkg)) {
dotnet nuget push $file --api-key "${{ secrets.PUBLISHMYGET }}" --source https://www.myget.org/F/nunit/api/v3/index.json --skip-duplicate
}
foreach($file in (Get-ChildItem "package" -Recurse -Include *.snupkg)) {
dotnet nuget push $file --api-key "${{ secrets.PUBLISHMYGET }}" --source https://www.myget.org/F/nunit/api/v3/index.json --skip-duplicate
}
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2011-2020 Charlie Poole, 2014-2023 Terje Sandstrom
Copyright (c) 2011-2020 Charlie Poole, 2014-2024 Terje Sandstrom

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 2 additions & 1 deletion NUnit3TestAdapter.sln
Expand Up @@ -52,7 +52,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "github", "github", "{062B17
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{7D708804-B2F1-4A31-A9FB-85A0C7433200}"
ProjectSection(SolutionItems) = preProject
.github\workflows\NUnit3TestAdapter.Cake.CI.yml = .github\workflows\NUnit3TestAdapter.Cake.CI.yml
.github\workflows\NUnit3TestAdapter.CI.yml = .github\workflows\NUnit3TestAdapter.CI.yml
.github\workflows\NUnit3TestAdapter.Myget.Publish.yml = .github\workflows\NUnit3TestAdapter.Myget.Publish.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "netcoreapp3.1", "netcoreapp3.1", "{2F940513-5B8F-45A5-A188-7C5D03D1B50D}"
Expand Down
3 changes: 1 addition & 2 deletions README.md
Expand Up @@ -15,8 +15,7 @@ or the latest developer build version


##### Builds on master
[![Cake build](https://img.shields.io/azure-devops/build/nunit/9d7ec8eb-1a1a-4fff-a88f-43bcdceb5f33/12.svg)](https://nunit.visualstudio.com/NUnit/_build?definitionId=12&_a=completed)
[![VS Build](https://img.shields.io/azure-devops/build/nunit/9d7ec8eb-1a1a-4fff-a88f-43bcdceb5f33/4.svg)](https://nunit.visualstudio.com/NUnit/_build?definitionId=4&_a=completed)
![NUnit3TestAdapter.CI](https://img.shields.io/github/actions/workflow/status/nunit/nunit3-vs-adapter/NUnit3TestAdapter.CI.yml?branch=master)
[![Tests](https://img.shields.io/azure-devops/tests/nunit/nunit/4)](https://nunit.visualstudio.com/NUnit/_build?definitionId=4&_a=completed)
[![Coverage](https://img.shields.io/azure-devops/coverage/nunit/nunit/4.svg)](https://nunit.visualstudio.com/NUnit/_build?definitionId=4&_a=completed)

Expand Down
2 changes: 1 addition & 1 deletion nuget/NUnit3TestAdapter.nuspec
Expand Up @@ -19,7 +19,7 @@
For VS 2017 and forward, you should add this package to every test project in your solution. (Earlier versions only require a single adapter package per solution.)
</description>
<releaseNotes>See https://docs.nunit.org/articles/vs-test-adapter/Adapter-Release-Notes.html </releaseNotes>
<copyright>Copyright (c) 2011-2021 Charlie Poole, 2014-2023 Terje Sandstrom</copyright>
<copyright>Copyright (c) 2011-2021 Charlie Poole, 2014-2024 Terje Sandstrom</copyright>
<language>en-US</language>
<tags>test visualstudio testadapter nunit nunit3 dotnet</tags>

Expand Down
13 changes: 2 additions & 11 deletions src/NUnitTestAdapterTests/Fakes/FakeDiscoveryContext.cs
Expand Up @@ -25,16 +25,7 @@

namespace NUnit.VisualStudio.TestAdapter.Tests.Fakes;

class FakeDiscoveryContext : IDiscoveryContext
class FakeDiscoveryContext(IRunSettings runSettings) : IDiscoveryContext
{
public FakeDiscoveryContext(IRunSettings runSettings)
{
RunSettings = runSettings;
}

#region IDiscoveryContextMembers

public IRunSettings RunSettings { get; }

#endregion
public IRunSettings RunSettings { get; } = runSettings;
}

0 comments on commit 2b04075

Please sign in to comment.