-
Notifications
You must be signed in to change notification settings - Fork 5
80 lines (66 loc) · 2.28 KB
/
create-compare-reference-linux.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
71
72
73
74
75
76
77
78
79
80
name: Save compare reference (Linux worker)
on:
# push:
# tags:
# - 'ammr-*'
workflow_dispatch:
inputs:
git_reference:
description: 'Which Git reference to check out. Examples: "refs/tags/v0.2.1", "refs/heads/master".'
default: refs/tags/vX.Y.Z
required: true
debug_config:
description: 'A debug environment varibles. Examples: VAR=VALUE'
required: false
default: ""
concurrency:
group: compare-test-${{ github.event.inputs.git_reference || github.ref }}
cancel-in-progress: true
jobs:
save_compare_test_data:
if: github.repository_owner == 'anybody'
runs-on: [self-hosted-linux]
strategy:
matrix:
include:
- ams_version: "7.5_Beta"
env:
GIT_REFERENCE: ${{ github.event.inputs.git_reference || github.ref }}
steps:
- name: Set variables
run: |
echo ${{ github.event.inputs.debug_config }} >> $GITHUB_ENV
- name: Checkout repository at ${{ env.GIT_REFERENCE }}
uses: actions/checkout@v4
with:
ref: ${{ env.GIT_REFERENCE }}
fetch-depth: 0
- id: RunAnyBody
uses: anybody/anybodycon-action@$v{{ matrix.ams_version }}
with:
license_server_password: ${{ secrets.LICENSE_PASSWORD }}
license_server: ${{ secrets.LICENSE_SERVER }}
run: |
cd Tests
pytest --runslow \
-n 2 \
--anytest-output=$GITHUB_WORKSPACE/_out \
--anytest-name=$GIT_REFERENCE
- name: Azure CLI script
uses: azure/CLI@v2
env:
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_CONN_STR }}
with:
inlineScript: |
ams_version="${{ steps.RunAnyBody.outputs.anybody_version }}"
container=ams-${ams_version//\./-}
folder=ammr/$GIT_REFERENCE
az storage container create -n $container
az storage blob delete-batch \
--source $container \
--pattern $folder/**/* || true
az storage blob upload-batch \
--destination $container \
--source $GITHUB_WORKSPACE/_out/$GIT_REFERENCE \
--destination-path $folder
rm -rf $GITHUB_WORKSPACE/_out/*