-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (59 loc) · 1.83 KB
/
run_tests.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Automated tests
on:
workflow_dispatch
permissions:
contents: read
pages: write
id-token: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Chrome
run: sudo apt-get install google-chrome-stable
- name: install dependencies
run: pip install -r requirements.txt
- name: run tests
run: pytest --host=server --alluredir=reports
continue-on-error: true
- name: Store allure history
uses: actions/upload-artifact@v3
with:
name: reports
path:
reports
retention-days: 1
generate-report:
runs-on: ubuntu-latest
needs: test
name: Generate report
steps:
- uses: actions/setup-java@v3
with:
distribution: 'microsoft' # See 'Supported distributions' for available options
java-version: '17'
- run: sudo wget https://github.com/allure-framework/allure2/releases/download/2.30.0/allure-2.30.0.tgz && sudo tar -zxvf allure-2.30.0.tgz -C /opt/ && sudo ln -s /opt/allure-2.30.0/bin/allure /usr/bin/allure
- name: Download all workflow run artifacts
uses: actions/download-artifact@v3
- run: allure generate -c reports -o _site
- name: Store generated report
uses: actions/upload-artifact@v3
with:
name: _site
path:
_site
retention-days: 1
publish-report:
runs-on: ubuntu-latest
needs: generate-report
name: Report publication
steps:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v3
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1.2.9