forked from AnthonySteele/JustEat.StatsD
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #277 from martincostello/GitHub-Actions
Switch to GitHub Actions
- Loading branch information
Showing
16 changed files
with
651 additions
and
329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
tags: [ v* ] | ||
pull_request: | ||
branches: [ master ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
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 | ||
|
||
- name: Install StatsD | ||
shell: pwsh | ||
if: ${{ runner.os == 'Windows' }} | ||
run: | | ||
git clone https://github.com/etsy/statsd.git ./_statsd | ||
Start-Process "node" -ArgumentList "./_statsd/stats.js ./tests/JustEat.StatsD.Tests/statsdconfig.js" -WindowStyle Hidden | ||
- name: Install StatsD | ||
shell: bash | ||
if: ${{ runner.os != 'Windows' }} | ||
run: | | ||
git clone https://github.com/etsy/statsd.git ./_statsd | ||
node ./_statsd/stats.js ./tests/JustEat.StatsD.Tests/statsdconfig.js & | ||
- name: Build, Test and Package | ||
shell: pwsh | ||
run: ./build.ps1 | ||
env: | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
DOTNET_NO_LOGO: 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 | ||
|
||
- name: Publish NuGet packages | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: packages-${{ matrix.os_name }} | ||
path: ./artifacts/packages | ||
|
||
- name: Push NuGet packages to NuGet.org | ||
run: dotnet nuget push "artifacts\packages\*.nupkg" --api-key ${{ secrets.NUGET_TOKEN }} --skip-duplicate --source https://api.nuget.org/v3/index.json | ||
if: ${{ github.repository_owner == 'justeat' && startsWith(github.ref, 'refs/tags/v') && runner.os == 'Windows' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: update-dotnet-sdk | ||
|
||
on: | ||
schedule: | ||
- cron: '0 */6 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Update .NET SDK | ||
runs-on: windows-latest | ||
|
||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Update .NET SDK | ||
shell: pwsh | ||
run: ./update-dotnet-sdk.ps1 -Channel "3.1" -GitHubToken ${{ secrets.GITHUB_TOKEN }} -UserName "github-actions[bot]" -UserEmail "github-actions[bot]@users.noreply.github.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.