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

ci: Enable GitHub Actions workflow #129

Merged
merged 4 commits into from
Apr 25, 2023
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
52 changes: 6 additions & 46 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@

<!--
### Contribution Checklist

- Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.

- Each pull request should address only one issue, not mix up code from multiple issues.

- Each commit in the pull request has a meaningful commit message

- Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.

**(The sections below can be removed for hotfixes of typos)**
-->

*(If this PR fixes a github issue, please add `Fixes #<xyz>`.)*

Fixes #<xyz>

*(or if this PR is one task of a github issue, please add `Master Issue: #<xyz>` to link to the master issue.)*

Master Issue: #<xyz>

### Motivation

*Explain here the context, and why you're making that change. What is the problem you're trying to solve.*
Expand All @@ -35,35 +12,18 @@ Master Issue: #<xyz>

*(Please pick either of the following options)*

This change is a trivial rework / code cleanup without any test coverage.

*(or)*
- [ ] This change is a trivial rework / code cleanup without any test coverage.

This change is already covered by existing tests, such as *(please describe tests)*.
- [ ] This change is already covered by existing tests, such as:

*(or)*

This change added tests and can be verified as follows:

*(example:)*
- *Added integration tests for end-to-end deployment with large payloads (10MB)*
- *Extended integration test for recovery after broker failure*
- [ ] This change added tests and can be verified as follows:

### Documentation

Check the box below.

Need to update docs?

- [ ] `doc-required`

(If you need help on updating docs, create a doc issue)

- [ ] `no-need-doc`

(Please explain why)

- [ ] `doc`

(If this PR contains doc changes)

- [ ] `doc-required`
- [x] `no-need-doc`
- [ ] `doc`
27 changes: 27 additions & 0 deletions .github/workflows/auto-labeling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Auto Labeling

on:
pull_request_target :
types:
- opened
- edited
- labeled

# A GitHub token created for a PR coming from a fork doesn't have
# 'admin' or 'write' permission (which is required to add labels)
# To avoid this issue, you can use the `scheduled` event and run
# this action on a certain interval.And check the label about the
# document.

jobs:
labeling:
if: ${{ github.repository == 'streamnative/pulsar-spark' }}
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: streamnative/github-workflow-libraries/doc-label-check@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
label-pattern: '- \[(.*?)\] ?`(.+?)`' # matches '- [x] `label`'
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on:
push:
branches:
- main
- branch-*
pull_request:

# Concurrency strategy:
# github.workflow: distinguish this workflow from others
# github.event_name: distinguish `push` event from `pull_request` event
# github.event.number: set to the number of the pull request if `pull_request` event
# github.run_id: otherwise, it's a `push` or `schedule` event, only cancel if we rerun the workflow
#
# Reference:
# https://docs.github.com/en/actions/using-jobs/using-concurrency
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.number || github.run_id }}
cancel-in-progress: true

jobs:
unittest:
name: Run unit tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
- name: Maven verify
run: ./mvnw clean verify
51 changes: 0 additions & 51 deletions .github/workflows/documentbot.yml

This file was deleted.

9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ jobs:
name: Upload Release files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
distribution: temurin
java-version: 8

- name: Release Maven package
uses: samuelmeuli/action-maven-publish@v1
Expand All @@ -25,4 +26,4 @@ jobs:
server_id: ossrh
maven_profiles: release
maven_goals_phases: clean deploy
maven_args: -DskipTests
maven_args: -DskipTests
25 changes: 0 additions & 25 deletions .jenkins/build.sh

This file was deleted.

18 changes: 18 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.0/apache-maven-3.9.0-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
Loading