-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (82 loc) · 2.26 KB
/
test.yaml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
inputs:
manual:
description: 'Run?'
required: false
type: boolean
jobs:
test:
name: Test
runs-on: [macos-15]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install xcresults
run: |
curl -L -s wget https://github.com/eroshenkoam/xcresults/releases/latest/download/xcresults
chmod +x xcresults
export PATH=$PATH:$(pwd)/xcresults/bin
- name: Install Allure
run: brew install allure
- name: Run Ui Tests
run: |
xcodebuild test \
-scheme SwiftRadioUITests \
-destination 'platform=iOS Simulator,name=iPhone 16,OS=latest' \
-resultBundlePath ./TestResults.xcresult
continue-on-error: true
- name: Generate Allure files
run: |
mkdir allure-results
xcresults export TestResults.xcresult -o allure-results
mkdir allure-report
allure generate allure-results --report-dir allure-report
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: allure-files
path: |
allure-results/
allure-report/
retention-days: 7
report:
runs-on: [ubuntu-latest]
name: Report to Allure
needs: test
steps:
- name: Install Allure
run: brew install allure
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: allure-files
path: ./
- name: Load test report history
uses: actions/checkout@v3
if: always()
continue-on-error: true
with:
ref: gh-pages
path: gh-pages
- name: Build test report
uses: simple-elf/[email protected]
if: always()
with:
gh_pages: gh-pages
allure_history: allure-history
allure_results: allure-results
- name: Publish test report
uses: peaceiris/actions-gh-pages@v3
if: always()
with:
github_token: ${{ secrets.TOKEN }}
publish_branch: gh-pages
publish_dir: allure-history