-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (59 loc) · 1.82 KB
/
python-app.yml
File metadata and controls
61 lines (59 loc) · 1.82 KB
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
name: Tests
on:
push:
branches:
- "**"
jobs:
Selenium-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Start containers
run: |
docker-compose -f "docker-compose.yml" up -d --build
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install -r requirements.txt;
- name: Check hub status
run: |
curl -L http://localhost:4444/wd/hub/status
- name: Run selenium pytest
env:
PASSWORD_GIT_TEST: ${{ secrets.PASSWORD_GIT_TEST }}
EMAIL_GIT_TEST: ${{ secrets.EMAIL_GIT_TEST }}
USER_GIT_TEST: ${{ secrets.USER_GIT_TEST }}
TOKEN_GIT_TEST: ${{ secrets.TOKEN_GIT_TEST }}
run: |
pytest -v --html=report.html --self-contained-html --junitxml="tests/reports/result.xml" --reruns 1 --reruns-delay 2
- name: Stop containers
if: always()
run: |
docker-compose -f "docker-compose.yml" down
- uses: actions/upload-artifact@v2
if: always()
with:
name: artifact-with-test-results
path: ${{ github.workspace }}/tests/reports
publish-test-results:
name: Publish selenium tests results
needs: Selenium-tests
runs-on: ubuntu-latest
if: always()
steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
- name: Publish results
uses: EnricoMi/publish-unit-test-result-action@v1
with:
check_name: Selenium Tests Results
files: artifacts/artifact-with-test-results/result.xml
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: artifacts/artifact-with-test-results/