-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (56 loc) · 1.58 KB
/
run-api-test.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
name: run api automated tests
on:
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
test-tags-to-include:
description: 'smoke or regression'
required: false
default: 'regression'
type: choice
options:
- 'smoke'
- 'regression'
environment:
description: 'qa or dev'
required: false
default: 'qa'
type: choice
options:
- 'qa'
- 'dev'
jobs:
api-tests:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: checkout
uses: actions/checkout@v3
- name: Set up JDK 11
timeout-minutes: 30
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: execute-api-tests-workflow-dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
mvn clean test -Dsuite=testng.xml -Dgroups="${{ inputs.test-tags-to-include }}" -Denvironment=${{ inputs.environment }}
- name: execute-api-tests-pull-request
if: ${{ github.event_name == 'pull_request' }}
run: |
mvn clean test -Dsuite=testng.xml -Dgroups=regression -Denvironment=qa
- uses: vimtor/action-zip@v1
timeout-minutes: 30
if: always()
with:
files: ./target/allure-results/
dest: ./allure-results.zip
- uses: actions/upload-artifact@v3
timeout-minutes: 30
if: always()
with:
name: allure-results
path: ./allure-results.zip