-
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (54 loc) · 1.64 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Run Python Tests
on:
push:
branches:
- dev-*
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python 3
uses: actions/setup-python@v5
with:
python-version: 3.11
- uses: Gr1N/setup-poetry@v8
- name: Install dependencies
run: |
sudo apt-get install tar
poetry config virtualenvs.create false
# can use single requirement file referring all three
poetry install --all-extras --no-root
- name: Run tests
run: |
# current dothttp prints to terminal, which is not good for pytest.
# although, for test cases, we should ask those who prints to return
pytest
- name: Upload test report
uses: actions/upload-artifact@v4
with:
name: test-report
path: report.html
# benchmark is not working for long time.
# TODO
# - name: Run benchmark
# run: pytest benchmarks/__main__.py --benchmark-json output.json
# - name: Download previous benchmark data
# uses: actions/cache@v1
# with:
# path: ./cache
# key: ${{ runner.os }}-benchmark
# - name: Store benchmark result
# uses: rhysd/github-action-benchmark@v1
# with:
# name: Python Benchmark with pytest-benchmark
# tool: 'pytest'
# output-file-path: output.json
# alert-threshold: '150%'
# fail-on-alert: true
# github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
# comment-on-alert: true