Skip to content

Commit

Permalink
workflow: Add workflow files for ci
Browse files Browse the repository at this point in the history
This patch adds workflow files for ci:

[schedule_work.yml]
 - The workflow file for scheduled work
 - Sync the repo with upstream repo and rebase the workflow branch
 - Review the patches in the patchwork and creates the PR if needed

[ci.yml]
 - The workflow file for CI tasks
 - Run CI tests when PR is created

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
  • Loading branch information
tedd-an authored and BluezTestBot committed Nov 20, 2021
1 parent 75082e7 commit 1f496b8
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on: [pull_request]

jobs:
ci:
runs-on: ubuntu-latest
name: CI for Pull Request
steps:
- name: Checkout the source code
uses: actions/checkout@v2
with:
path: src

- name: Checkout the BlueZ source code
uses: actions/checkout@v2
with:
repository: BluezTestBot/bluez
path: bluez

- name: Create output folder
run: |
mkdir results
- name: CI
uses: BluezTestBot/action-kernel-ci@main
with:
src_path: src
bluez_path: bluez
output_path: results
github_token: ${{ secrets.GITHUB_TOKEN }}
email_token: ${{ secrets.EMAIL_TOKEN }}
patchwork_token: ${{ secrets.PATCHWORK_TOKEN }}

- name: Upload results
uses: actions/upload-artifact@v2
with:
name: tester-logs
path: results/
if-no-files-found: warn
35 changes: 35 additions & 0 deletions .github/workflows/schedule_work.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Scheduled Work

on:
schedule:
- cron: "20 * * * *"

jobs:
sync_repo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Sync Repo
uses: BluezTestBot/action-manage-repo@master
with:
src_repo: "bluez/bluetooth-next"
for_upstream_branch: 'for-upstream'
workflow_branch: 'workflow'
github_token: ${{ secrets.GITHUB_TOKEN }}

sync_patchwork:
needs: sync_repo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Sync Patchwork
uses: BluezTestBot/action-patchwork-to-pr@master
with:
pw_exclude_str: 'BlueZ'
base_branch: 'workflow'
github_token: ${{ secrets.ACTION_TOKEN }}

0 comments on commit 1f496b8

Please sign in to comment.