Skip to content

Commit

Permalink
ci: add path ignore files for ci workflow (apache#93)
Browse files Browse the repository at this point in the history
- Only run tests when a change is made on any of the relevant paths
- Move license and style checks to another CI workflow

Closes apache#84 

---------

Co-authored-by: Shiyan Xu <[email protected]>
  • Loading branch information
abyssnlp and xushiyan authored Jul 26, 2024
1 parent 2bade8f commit 3e71bb0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 11 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,33 @@ on:
branches:
- main
- release/**
paths-ignore:
- '**.md'
- '.github/ISSUE_TEMPLATE/**'
- '.github/PULL_REQUEST_TEMPLATE.md'
- '.asf.yaml'
- '.licenserc.yaml'
- '.commitlintrc.yaml'
- 'LICENSE'
- 'NOTICE'
pull_request:
branches:
- main
paths-ignore:
- '**.md'
- '.github/ISSUE_TEMPLATE/**'
- '.github/PULL_REQUEST_TEMPLATE.md'
- '.asf.yaml'
- '.licenserc.yaml'
- '.commitlintrc.yaml'
- 'LICENSE'
- 'NOTICE'

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

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check license header
uses: apache/skywalking-eyes/[email protected]
- name: Check code style
run: cd python && make check-rust

rust-tests:
strategy:
fail-fast: false
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/pr.yml → .github/workflows/compliance.yml
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: PR
name: Compliance

on:
pull_request_target:
Expand All @@ -28,7 +28,7 @@ permissions:
pull-requests: write

jobs:
compliance:
check-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -41,3 +41,11 @@ jobs:
echo ${{ github.event.pull_request.title }} | npx commitlint
- name: Labeling
uses: actions/labeler@v5
check-changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check license header
uses: apache/skywalking-eyes/[email protected]
- name: Check code style
run: cd python && make check-rust

0 comments on commit 3e71bb0

Please sign in to comment.