-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (58 loc) · 2.1 KB
/
artillery-tests.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
name: Artillery Tests
on:
push:
branches:
- development
jobs:
artillery_tests:
name: Artillery Tests
runs-on: ubuntu-latest
continue-on-error: true
strategy:
max-parallel: 1
matrix:
file:
- ./testing/artillery/artillery-users.yaml
- ./testing/artillery/artillery-users-id.yml
- ./testing/artillery/artillery-users-id-tasks.yml
- ./testing/artillery/artillery-users-id-tasks-id.yml
env:
NPM_CONFIG_PREFIX: "~/.npm-global"
STAGE_NAME: merge-perf-test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "14"
check-latest: true
- name: nodeJS and npm version
run: npm -v
- name: npm init
run: npm init -y
- name: Install artillery
run: npm install -g artillery
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H-%M-%S')"
- name: Running Artillery Test
run: /home/runner/.npm-global/lib/node_modules/artillery/bin/artillery run --output artilleryReport_userAPI_${{ steps.date.outputs.date }}.json ${{ matrix.file }}
- name: Check Artillery Performance test file
run: ls -ltr artilleryReport_userAPI_${{ steps.date.outputs.date }}.json
#Azure Login
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_SP_CREDENTIALS }}
#Upload File
- name: uploading to Azure Blob Storage
uses: azure/CLI@v1
with:
azcliversion: 2.19.1
inlineScript: |
az storage blob upload --account-name ${{ secrets.STORAGE_ACCOUNT_NAME }} --account-key ${{ secrets.STORAGE_ACCOUNT_KEY }} --container-name ${{ secrets.BLOB_CONTAINER }} --name artilleryReport_userAPI_${{ steps.date.outputs.date }}.json --file artilleryReport_userAPI_${{ steps.date.outputs.date }}.json
# Azure logout
- name: logout
run: |
az logout