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

Remove packages.lock.json & fix CI caching #265

Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/auto-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Auto Label
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: banyan/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 7 additions & 0 deletions .github/workflows/build_deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ jobs:
5.0.x
6.0.x
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.?sproj') }}
restore-keys: |
Yury-Fridlyand marked this conversation as resolved.
Show resolved Hide resolved
${{ runner.os }}-nuget-
- name: Install docfx
run: dotnet tool install --global docfx

Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
5.0.x
6.0.x
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
Yury-Fridlyand marked this conversation as resolved.
Show resolved Hide resolved
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.?sproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- run: dotnet nuget locals all --clear
name: Clear nuget cache
- name: Compile
run: |
dotnet build
13 changes: 1 addition & 12 deletions .github/workflows/dependabot_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ jobs:
private_key: ${{ secrets.APP_PRIVATE_KEY }}
installation_id: 22958780

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
5.0.x
6.0.x

- name: Check out code
uses: actions/checkout@v3
with:
Expand All @@ -41,14 +34,10 @@ jobs:
with:
version: 'Unreleased'

- name: Update packages.lock.json
if: ${{ contains(github.event.pull_request.labels.*.name, 'dependabot') }}
run: dotnet restore --force-evaluate

- name: Commit the changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Update changelog & packages.lock.json"
commit_message: "Update changelog"
branch: ${{ github.head_ref }}
commit_user_name: dependabot[bot]
commit_user_email: [email protected]
Expand Down
24 changes: 8 additions & 16 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,19 @@ jobs:
with:
path: client

- uses: actions/setup-dotnet@v1
- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
5.0.x
6.0.x
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.?sproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- run: dotnet nuget locals all --clear
name: Clear nuget cache
working-directory: client

# Due to https://github.com/opensearch-project/project-website/issues/737
# No plugins released for versions 1.0.x , so we need to compile plugins on our own to run tests properly
# Compiled plugins are copied to ${OPENSEARCH_PLUGINS_DIRECTORY} where picked up by the test framework
Expand Down Expand Up @@ -107,23 +103,19 @@ jobs:
with:
path: client

- uses: actions/setup-dotnet@v1
- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
5.0.x
6.0.x
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.?sproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- run: dotnet nuget locals all --clear
name: Clear nuget cache
working-directory: client

- name: Restore or Build OpenSearch
uses: ./client/.github/actions/cached-git-build
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Check license headers
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: lychee Link Checker
id: lychee
uses: lycheeverse/[email protected]
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
5.0.x
6.0.x
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.?sproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- run: dotnet nuget locals all --clear
name: Clear nuget cache
- name: Generate Release
run: |
./build.sh release $VERSION
Expand Down
20 changes: 8 additions & 12 deletions .github/workflows/test-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
5.0.x
6.0.x
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.?sproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- run: dotnet nuget locals all --clear
name: Clear nuget cache
- run: ./build.sh test --report
name: Test
- name: Test Results
Expand Down Expand Up @@ -65,19 +62,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
5.0.x
6.0.x
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.?sproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- run: ./build.sh canary --report
name: Test
- name: Test Results
Expand Down
2 changes: 0 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
<SolutionRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.bat))</SolutionRoot>

<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<RestoreLockedMode>true</RestoreLockedMode>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>

<ExposedPublicKey>002400000480000094000000060200000024000052534131000400000100010025d3a22bf3781ba85067374ad832dfcba3c4fa8dd89227e36121ba17b2c33ad6b6ce03e45e562050a031e2ff7fe12cff9060a50acbc6a0eef9ef32dc258d90f874b2e76b581938071ccc4b4d98204d1d6ca7a1988d7a211f9fc98efd808cf85f61675b11007d0eb0461dc86a968d6af8ebba7e6b540303b54f1c1f5325c252be</ExposedPublicKey>
</PropertyGroup>
Expand Down
Loading
Loading