Skip to content

Commit

Permalink
ci: Refactor workflows layout (#4139)
Browse files Browse the repository at this point in the history
* ci: Refactor workflows layout

Signed-off-by: Xuanwo <[email protected]>

* Rename

Signed-off-by: Xuanwo <[email protected]>

* Fix oli

Signed-off-by: Xuanwo <[email protected]>

---------

Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo authored Feb 4, 2024
1 parent af2f83e commit 7d94296
Show file tree
Hide file tree
Showing 36 changed files with 234 additions and 16 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,18 @@ def calculate_hint(changed_files: list[str]) -> Hint:

for p in changed_files:
# workflow behavior tests affected
if p == ".github/workflows/behavior_test.yml":
if p == ".github/workflows/test_behavior.yml":
hint.core = True
for language in LANGUAGE_BINDING:
setattr(hint, f"binding_{language}", True)
hint.all_service = True

if p == ".github/workflows/behavior_test_core.yml":
if p == ".github/workflows/test_behavior_core.yml":
hint.core = True
hint.all_service = True

for language in LANGUAGE_BINDING:
if p == f".github/workflows/behavior_test_binding_{language}.yml":
if p == f".github/workflows/test_behavior_binding_{language}.yml":
setattr(hint, f"binding_{language}", True)
hint.all_service = True
# core affected
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

name: Oay WebDAV Test
name: Oay CI

on:
push:
Expand All @@ -26,15 +26,31 @@ on:
- main
paths:
- "bin/oay/**"
- ".github/workflows/oay_test_webdav.yml"
workflow_dispatch:
- "core/**"
- ".github/workflows/ci_bin_oay.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
backend-fs:
check_clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: ./.github/actions/setup
with:
need-rocksdb: true
need-protoc: true
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Cargo clippy
working-directory: bin/oay
run: cargo clippy --all-targets --all-features -- -D warnings

test_backend_fs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/ci_bin_ofs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: Ofs CI

on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- "bin/ofs/**"
- "core/**"
- ".github/workflows/ci_bin_ofs.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
check_clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: ./.github/actions/setup
with:
need-rocksdb: true
need-protoc: true
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Cargo clippy
working-directory: bin/ofs
run: cargo clippy --all-targets --all-features -- -D warnings
51 changes: 51 additions & 0 deletions .github/workflows/ci_bin_oli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: Oli CI

on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- "bin/oay/**"
- "core/**"
- ".github/workflows/ci_bin_oli.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
check_clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: ./.github/actions/setup
with:
need-rocksdb: true
need-protoc: true
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Cargo clippy
working-directory: bin/oli
run: cargo clippy --all-targets --all-features -- -D warnings
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
47 changes: 47 additions & 0 deletions .github/workflows/ci_integration_dav_server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: Integration Dav Server CI

on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- "integrations/dav-server/**"
- "core/**"
- ".github/workflows/ci_integration_dav_server.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
check_clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: ./.github/actions/setup

- name: Cargo clippy
working-directory: integrations/dav-server
run: cargo clippy --all-targets --all-features -- -D warnings
47 changes: 47 additions & 0 deletions .github/workflows/ci_integration_object_store.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: Integration Object Store CI

on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- "integrations/object_store/**"
- "core/**"
- ".github/workflows/ci_integration_object_store.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
check_clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: ./.github/actions/setup

- name: Cargo clippy
working-directory: integrations/object_store
run: cargo clippy --all-targets --all-features -- -D warnings
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ on:
push:
tags:
- '*'
pull_request:
branches:
- main
paths:
- ".github/workflows/release_core.yml"
workflow_dispatch:

jobs:
publish:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
export GITHUB_IS_PUSH=$is_push
# Run the workflow planner script
PLAN=$(./.github/scripts/behavior_test/plan.py $files_changed)
PLAN=$(./.github/scripts/test_behavior/plan.py $files_changed)
echo "Plan:"
echo "$PLAN" | jq .
echo "plan=$PLAN" >> $GITHUB_OUTPUT
Expand All @@ -85,7 +85,7 @@ jobs:
strategy:
matrix:
include: ${{ fromJson(needs.plan.outputs.plan).core }}
uses: ./.github/workflows/behavior_test_core.yml
uses: ./.github/workflows/test_behavior_core.yml
with:
os: ${{ matrix.os }}
cases: ${{ toJson(matrix.cases) }}
Expand All @@ -98,7 +98,7 @@ jobs:
strategy:
matrix:
include: ${{ fromJson(needs.plan.outputs.plan).binding_java }}
uses: ./.github/workflows/behavior_test_binding_java.yml
uses: ./.github/workflows/test_behavior_binding_java.yml
with:
os: ${{ matrix.os }}
cases: ${{ toJson(matrix.cases) }}
Expand All @@ -111,7 +111,7 @@ jobs:
strategy:
matrix:
include: ${{ fromJson(needs.plan.outputs.plan).binding_python }}
uses: ./.github/workflows/behavior_test_binding_python.yml
uses: ./.github/workflows/test_behavior_binding_python.yml
with:
os: ${{ matrix.os }}
cases: ${{ toJson(matrix.cases) }}
Expand All @@ -124,7 +124,7 @@ jobs:
strategy:
matrix:
include: ${{ fromJson(needs.plan.outputs.plan).binding_nodejs }}
uses: ./.github/workflows/behavior_test_binding_nodejs.yml
uses: ./.github/workflows/test_behavior_binding_nodejs.yml
with:
os: ${{ matrix.os }}
cases: ${{ toJson(matrix.cases) }}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
connect-token: ${{ secrets.OP_CONNECT_TOKEN }}

- name: Test Core
uses: ./.github/actions/behavior_test_binding_java
uses: ./.github/actions/test_behavior_binding_java
with:
setup: ${{ matrix.cases.setup }}
service: ${{ matrix.cases.service }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Test Core
uses: ./.github/actions/behavior_test_binding_nodejs
uses: ./.github/actions/test_behavior_binding_nodejs
with:
setup: ${{ matrix.cases.setup }}
service: ${{ matrix.cases.service }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
maturin develop -E test -F ${{ matrix.cases.feature }}
- name: Test Core
uses: ./.github/actions/behavior_test_binding_python
uses: ./.github/actions/test_behavior_binding_python
with:
setup: ${{ matrix.cases.setup }}
service: ${{ matrix.cases.service }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
connect-token: ${{ secrets.OP_CONNECT_TOKEN }}

- name: Test Core
uses: ./.github/actions/behavior_test_core
uses: ./.github/actions/test_behavior_core
with:
setup: ${{ matrix.cases.setup }}
service: ${{ matrix.cases.service }}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 7d94296

Please sign in to comment.