Skip to content

Commit

Permalink
add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rayrayraykk committed Jan 12, 2024
1 parent 1589a45 commit 8fcf730
Show file tree
Hide file tree
Showing 7 changed files with 182 additions and 5 deletions.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug Report
about: Create a report to help us improve
title: '[BUG]'
labels: bug
assignees: ''

---

## Describe the bug
A clear and concise description of what the bug is.

## Steps to Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

## Expected behavior
A clear and concise description of what you expected to happen.

## Screenshots
If applicable, add screenshots to help explain your problem.

## Environment (please complete the following information):
- OS: [e.g. Windows, macOS, Linux]
- OS Version: [e.g. Windows 10, Ubuntu 20.04, macOS Big Sur]
- Application Version: [e.g. 1.0.0]

## Additional context
Add any other context about the problem here or any other relevant information that could help in diagnosing the issue.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''

---


20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
48 changes: 48 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- 'Feature'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- 'hotfix'
- title: '🧰 Maintenance'
labels:
- 'chore'
- 'maintenance'
- 'refactor'
- 'style'
- 'docs'
exclude-labels:
- 'skip-changelog'
- 'duplicate'
- 'question'
- 'invalid'
- 'wontfix'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## What's Changed
$CHANGES
## Contributors
Thanks to all the contributors who have helped with this release!
$CONTRIBUTORS
17 changes: 12 additions & 5 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pre-commit (Required)
name: Pre-commit

on: [push, pull_request]

Expand All @@ -18,11 +18,18 @@ jobs:
uses: actions/setup-python@master
with:
python-version: 3.9
- name: Install dependencies
- name: Install AgentScope
run: |
pip install -q -e .[full]
- name: Install pre-commit
run: |
pip install pre-commit
pre-commit install
- name: Pre-commit starts
run: |
pre-commit run --all-files
[ $? -eq 1 ] && exit 1 || echo "Passed"
pre-commit run --all-files > pre-commit.log 2>&1 || true
cat pre-commit.log
if grep -q Failed pre-commit.log; then
echo -e "\e[41m [**FAIL**] Please install pre-commit and format your code first. \e[0m"
exit 1
fi
echo -e "\e[46m ********************************Passed******************************** \e[0m"
28 changes: 28 additions & 0 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "API Reference"
on:
pull_request:
types: [opened, synchronize, edited]

jobs:
docs:
if: true == contains(github.event.pull_request.title, 'DOC')
runs-on: ubuntu-latest
timeout-minutes: 20
env:
OS: ${{ matrix.os }}
PYTHON: '3.9'
steps:
- uses: actions/checkout@master
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}
- name: Generate Documentation
uses: ammaraskar/sphinx-action@master
with:
docs-folder: "docs/"
- name: Upload Documentation
uses: actions/upload-artifact@v3
with:
name: APIReference
path: doc/build/html/
32 changes: 32 additions & 0 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Python Unittest Coverage

on: [push, pull_request]

jobs:
test:
if: false == contains(github.event.pull_request.title, 'WIP')
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.9']
env:
OS: ${{ matrix.os }}
PYTHON: '3.9'
timeout-minutes: 20
steps:
- uses: actions/checkout@master
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
pip install -q -e .[full]
pip install coverage
- name: Run tests with coverage
run: |
coverage run tests/run.py
- name: Generate coverage report
run: |
coverage report -m

0 comments on commit 8fcf730

Please sign in to comment.