-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (58 loc) · 1.59 KB
/
test-execution.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
70
name: API Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
builds:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: 17
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2/repository # Cache the Maven repository
key: maven-${{ runner.os }}-${{ hashFiles('**/pom.xml') }} # Cache key based on the OS and project files
restore-keys: |
maven-${{ runner.os }}-
- name: Run Tests
run: mvn clean test
- uses: actions/upload-artifact@v3
with:
name: allure-results
path: target/allure-results
retention-days: 20
- name: Get Allure history
uses: actions/checkout@v4
if: always()
continue-on-error: true
with:
ref: gh-pages
path: gh-pages
- name: Allure Report action from marketplace
uses: simple-elf/allure-report-action@master
if: always()
id: allure-report
with:
allure_results: target/allure-results
gh_pages: gh-pages
allure_report: allure-report
allure_history: allure-history
keep_reports: 20
- name: Deploy report to Github Pages
if: always()
uses: peaceiris/actions-gh-pages@v2
env:
PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: allure-history