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

Unify most of our CI under github actions #5371

Merged
merged 20 commits into from
Mar 2, 2021
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
6 changes: 6 additions & 0 deletions .ci/packages.lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"version": 1,
"dependencies": {
".NETCoreApp,Version=v5.0": {}
}
}
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ indent_size = 4
indent_style = tab
indent_size = 4

[*.{fs,fsx,yml}]
[*.{fs,fsx}]
indent_style = space
indent_size = 4

[*.{md,markdown,json,js,csproj,fsproj,targets,targets,props}]
[*.{md,markdown,json,js,csproj,fsproj,targets,targets,props,yml}]
indent_style = space
indent_size = 2

Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/integration-jobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Integration


on:
pull_request:
paths-ignore:
- 'README.md'
- '.editorconfig'
push:
paths-ignore:
- 'README.md'
- '.editorconfig'
branches:
- main
- master
- '[0-9]+.[0-9]+'
- '[0-9]+.x'

jobs:
integration-tests:
name: Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
stack_version: [
'7.0.0',
'7.1.0',
'7.2.0',
'7.3.0',
'7.4.0',
'7.5.0',
'7.6.0',
'7.7.0',
'7.8.0',
'7.9.0',
'7.10.0',
'7.11.0',
'7.12.0-SNAPSHOT',
'latest-7'
]

steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.100'
- uses: actions/cache@v2
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- uses: actions/cache@v2
with:
path: ~/.local/share/ElasticManaged/elasticsearch-${{ matrix.stack_version }}
key: ${{ runner.os }}-elastic-managed-${{ matrix.stack_version }}
restore-keys: |
${{ runner.os }}-elastic-managed-

- run: "./build.sh integrate ${{ matrix.stack_version }} readonly,writable random:test_only_one --report"
name: ${{ matrix.stack_version }}
- name: Results ${{ matrix.stack_version }}
# only report on if the previous run failed, otherwise this ends up being too noisy
if: ${{ failure() }}
uses: mikepenz/action-junit-report@v2
with:
report_paths: 'build/output/junit-*.xml'
github_token: ${{ secrets.GITHUB_TOKEN }}
fail_on_failure: true
require_tests: true
check_name: ${{ matrix.stack_version }}

44 changes: 44 additions & 0 deletions .github/workflows/stale-jobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Stale


on:
pull_request:
paths-ignore:
- 'README.md'
- '.editorconfig'
push:
paths-ignore:
- 'README.md'
- '.editorconfig'
branches:
- main
- master
- '[0-9]+.[0-9]+'
- '[0-9]+.x'

jobs:
unit-tests:
name: Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.100'
- uses: actions/cache@v2
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-

- run: ./build.sh documentation
name: Build docs

- run: |
if [ -n "$(git status --porcelain)" ]; then echo Error: changes found after running documentation; git diff; git status; exit 1; fi
name: 'Ensure no stale docs'
if: github.event_name == 'pull_request' && startswith(github.ref, 'refs/heads') && github.repository == 'elastic/elasticsearch-net'


83 changes: 83 additions & 0 deletions .github/workflows/test-jobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Tests


on:
pull_request:
paths-ignore:
- 'README.md'
- '.editorconfig'
push:
paths-ignore:
- 'README.md'
- '.editorconfig'
branches:
- main
- master
- '[0-9]+.[0-9]+'
- '[0-9]+.x'

jobs:
unit-tests:
name: Unit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.100'
- uses: actions/cache@v2
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-

- run: ./build.sh test --report
name: Test
- name: Test Results
if: always()
uses: mikepenz/action-junit-report@v2
with:
report_paths: 'build/output/junit-*.xml'
github_token: ${{ secrets.GITHUB_TOKEN }}
fail_on_failure: true
require_tests: true
check_name: Unit Test Results

# Packages nuget packages first and then uses the nuget packages to test
# Also builds versioned nuget packages
canary-tests:
name: Canary
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.100'
- uses: actions/cache@v2
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-

- run: ./build.sh canary --report
name: Test
- name: Test Results
if: always()
uses: mikepenz/action-junit-report@v2
with:
report_paths: 'build/output/junit-*.xml'
github_token: ${{ secrets.GITHUB_TOKEN }}
fail_on_failure: true
require_tests: true
check_name: Canary Test Results

# Github packages requires authentication, this is likely going away in the future so for now we publish to feedz.io
# Only runs on builds on heads
- run: dotnet nuget push 'build/output/*.nupkg' -k ${{secrets.FEEDZ_IO_API_KEY}} -s https://f.feedz.io/elastic/all/nuget/index.json --skip-duplicate --no-symbols true
name: publish canary packages to feedz.io
if: github.event_name == 'push' && startswith(github.ref, 'refs/heads')

2 changes: 2 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
<OutputPath Condition="'$(OutputPathBaseDir)' != ''">$(OutputPathBaseDir)\$(MSBuildProjectName)\</OutputPath>
<SolutionRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.bat))</SolutionRoot>

<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>

<DefineConstants Condition="'$(TargetFramework)'=='net461' or '$(TargetFramework)'=='net472'">$(DefineConstants);FULLFRAMEWORK</DefineConstants>
<DefineConstants Condition="$(DefineConstants.Contains(FULLFRAMEWORK)) == False">$(DefineConstants);DOTNETCORE</DefineConstants>
<DefineConstants Condition="$(DefineConstants.Contains(FULLFRAMEWORK)) == False and '$(TargetFramework)'!='netstandard2.0'">$(DefineConstants);DOTNETCORE_2_1_OR_HIGHER</DefineConstants>
Expand Down
2 changes: 0 additions & 2 deletions Elasticsearch.sln
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Root", "Root", "{EAE89579-C
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitignore = .gitignore
appveyor.yml = appveyor.yml
global.json = global.json
azure-pipelines.yml = azure-pipelines.yml
nuget.config = nuget.config
dotnet-tools.json = dotnet-tools.json
EndProjectSection
Expand Down
23 changes: 0 additions & 23 deletions appveyor.yml

This file was deleted.

Loading