Skip to content

Commit

Permalink
rollback CI\CD + create another for integrations on ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
DeagleGross committed Aug 3, 2024
1 parent 23065ae commit ac7b910
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 41 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/dotnet-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: .NET

on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # depth is needed for nbgv

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
6.0.x
8.0.x
include-prerelease: true

- uses: dotnet/nbgv@master
with:
setAllVars: true

- name: Restore dependencies
run: dotnet restore Dapper.AOT.sln

- name: Build
run: dotnet build Dapper.AOT.sln --no-restore -c Release

- name: Integration Tests
run: dotnet test test/Dapper.AOT.Test.Integration/Dapper.AOT.Test.Integration.csproj --no-build --verbosity normal -c Release
79 changes: 38 additions & 41 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,46 +10,43 @@ on:
jobs:
build:

runs-on: ubuntu-20.04
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # depth is needed for nbgv

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
6.0.x
8.0.x
include-prerelease: true

- uses: dotnet/nbgv@master
with:
setAllVars: true

- name: Restore dependencies
run: dotnet restore Dapper.AOT.sln

- name: Purge
run: del src/Dapper.*/bin/Release/Dapper.*.nupkg

- name: Build
run: dotnet build Dapper.AOT.sln --no-restore -c Release

- name: Test
run: dotnet test test/Dapper.AOT.Test/Dapper.AOT.Test.csproj --no-build --verbosity normal -c Release -f net6.0 --filter FullyQualifiedName!~Integration

- name: Integration Tests
run: dotnet test test/Dapper.AOT.Test.Integration/Dapper.AOT.Test.Integration.csproj --no-build --verbosity normal -c Release

- name: Pack
if: ${{ success() && !github.base_ref }}
run: dotnet pack src/Dapper.AOT/Dapper.AOT.csproj --no-build --verbosity normal -c Release

- name: Push to MyGet
if: ${{ success() && !github.base_ref }}
run: dotnet nuget push src/Dapper.*/bin/Release/Dapper.*.nupkg --source https://www.myget.org/F/dapper/api/v2/package --api-key "$env:MYGETAPIKEY"
env:
MYGETAPIKEY: ${{ secrets.MYGETAPIKEY }}
- uses: actions/checkout@v2
with:
fetch-depth: 0 # depth is needed for nbgv

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
6.0.x
8.0.x
include-prerelease: true

- uses: dotnet/nbgv@master
with:
setAllVars: true

- name: Restore dependencies
run: dotnet restore Build.csproj

- name: Purge
run: del src/Dapper.*/bin/Release/Dapper.*.nupkg

- name: Build
run: dotnet build Build.csproj --no-restore -c Release

- name: Test
run: dotnet test Build.csproj --no-build --verbosity normal -c Release -f net6.0 --filter FullyQualifiedName!~Integration

- name: Pack
if: ${{ success() && !github.base_ref }}
run: dotnet pack src/Dapper.AOT/Dapper.AOT.csproj --no-build --verbosity normal -c Release

- name: Push to MyGet
if: ${{ success() && !github.base_ref }}
run: dotnet nuget push src/Dapper.*/bin/Release/Dapper.*.nupkg --source https://www.myget.org/F/dapper/api/v2/package --api-key "$env:MYGETAPIKEY"
env:
MYGETAPIKEY: ${{ secrets.MYGETAPIKEY }}
1 change: 1 addition & 0 deletions Dapper.AOT.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Directory.Build.props = Directory.Build.props
Directory.Packages.props = Directory.Packages.props
.github\workflows\dotnet.yml = .github\workflows\dotnet.yml
.github\workflows\dotnet-integration.yml = .github\workflows\dotnet-integration.yml
global.json = global.json
nuget.config = nuget.config
README.md = README.md
Expand Down

0 comments on commit ac7b910

Please sign in to comment.