Skip to content

Commit

Permalink
Merge pull request openimsdk#17 from longyuqing112/allure-report-v1.0
Browse files Browse the repository at this point in the history
create-allure-report
  • Loading branch information
skiffer-git authored Jun 12, 2024
2 parents 34d2141 + 6072d65 commit 2951de5
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 6 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,36 @@ jobs:
run: |
cd ${{ github.workspace }}/main-repo
xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' pytest -v -s ./script --alluredir=./reports/allure-results
env:
LANG: zh_CN.UTF-8

- name: Upload Allure results to Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: allure-results
path: ${{ github.workspace }}/main-repo/reports/allure-results

- name: Checkout gh-pages for report history
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages

# Optional: Serve Allure report
- name: Serve Allure report
uses: simple-elf/[email protected]
with:
results_directory: ${{ github.workspace }}/main-repo/reports/allure-results
allure_version: '2.13.9' # Specify Allure version if needed
allure_results: main-repo/reports/allure-results
gh_pages: gh-pages
allure_report: main-repo/reports/allure-report
allure_history: gh-pages/allure-history
env:
LANG: zh_CN.UTF-8

- name: Deploy report to Github Pages
uses: peaceiris/actions-gh-pages@v2
env:
PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: gh-pages/allure-history

20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ To run all test cases in the suite:
pytest -v -s ./script
```
## Running Allure-report
To run all test cases in the suite:
1. Open your Git testing environment.
2. Execute the following command:
```
pytest --alluredir=./reports/allure-results
```
```
allure serve ./reports/allure-results
```
#### 4. Install OpenIM Server Test
Expand All @@ -59,11 +71,13 @@ git clone https://github.com/openimsdk/openim-docker
cd openim-docker
```

init config:
edit env:
```
make init
MINIO_EXTERNAL_ADDRESS="http://external_ip:10005"
GRAFANA_URL="http://external_ip:13000/"
```


start docker:
```
docker compose up -d
Expand All @@ -73,7 +87,7 @@ start test-e2e:
```
cd ..
cd test-e2e
pytest main.py
pytest -v -s ./script
```

### Using the Headless Browser in Code
Expand Down

0 comments on commit 2951de5

Please sign in to comment.