-
Notifications
You must be signed in to change notification settings - Fork 79
101 lines (96 loc) · 3.72 KB
/
PR.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
96
97
98
99
100
101
name: Sovrin PR
on:
pull_request:
paths:
- '**'
- '.github/**'
- "!sovrin/metadata.json"
branches:
- master
jobs:
workflow-setup:
name: Initialize Workflow
runs-on: ubuntu-latest
outputs:
GITHUB_REPOSITORY_NAME: ${{ steps.setup.outputs.GITHUB_REPOSITORY_NAME }}
distribution: ${{ steps.setup.outputs.distribution }}
publish: ${{ steps.setup.outputs.publish }}
testsNeeded: ${{ steps.testsNeeded.outputs.testsNeeded }}
steps:
- name: checkout source code
uses: actions/checkout@v4
- name: setup
id: setup
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v2
with:
ownerRepo: "sovrin-foundation"
- name: testsNeeded
id: testsNeeded
uses: dorny/paths-filter@v3
with:
filters: |
testsNeeded:
- '**.py'
- 'sovrin/*genesis'
- '.github/**'
extract-information:
name: Extract needed Information for Indy-Test-Automation
needs: [workflow-setup]
if: ${{ needs.workflow-setup.outputs.testsNeeded == 'true' }}
runs-on: ubuntu-latest
outputs:
indyVersion: ${{ steps.indy-versions.outputs.indyVersion}}
sovtokenVersion: ${{ steps.sovtoken-versions.outputs.sovtokenVersion}}
sovtokenfeesVersion: ${{ steps.sovtoken-versions.outputs.sovtokenfeesVersion}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Set up python
run: |
pip3 install semver
- name: Get Version with UX-timestamp
id: version
run: |
echo "version=$(python3 updateVersion.py --getVersion)" >> $GITHUB_OUTPUT
- name: prepare
run: ./build-scripts/ubuntu-2004/prepare-package.sh ./ ${{ steps.version.outputs.version }}
- name: Extract Indy Versions
id: indy-versions
run: |
echo "indyVersion=$(grep -oP "\d+.\d+.\d+((-|.)?rc\d+)?" <<< $(grep -oP "indy-node==\d+.\d+.\d+((-|.)?rc\d+)?" setup.py))" >>$GITHUB_OUTPUT
- name: Extract sovtoken & sovtokenfees Version
id: sovtoken-versions
run: |
echo "sovtokenVersion=$(grep -oP "\d+.\d+.\d+((-|.)?((rc)|(dev))?\d+)?" <<< $(grep -oP "sovtoken==\d+.\d+.\d+((-|.)?(rc|dev)\d+)?" setup.py))" >>$GITHUB_OUTPUT
echo "sovtokenfeesVersion=$(grep -oP "\d+.\d+.\d+((-|.)?((rc)|(dev))?\d+)?" <<< $(grep -oP "sovtokenfees==\d+.\d+.\d+((-|.)?(rc|dev)\d+)?" setup.py))" >>$GITHUB_OUTPUT
build_sovrin:
name: Build Sovrin Deb
needs: [workflow-setup]
if: ${{ needs.workflow-setup.outputs.testsNeeded == 'true' }}
uses: ./.github/workflows/reuseable_build_package.yaml
with:
isDev: true
call-indy-test-automation:
name: Indy-Test-Automation
needs: [workflow-setup, extract-information, build_sovrin]
if: ${{ needs.workflow-setup.outputs.testsNeeded == 'true' }}
uses: hyperledger/indy-test-automation/.github/workflows/[email protected]
with:
ubuntuVersion: "ubuntu-2004"
libsovtokenJSON: "{\"install\": \"yes\", \"version\": \"1.0.5\"}"
libIndyVersion: "1.15.0~1625-bionic"
includePaymentTests: true
testAutomationBranch: "v0.11"
debName: "sovrin_*.deb"
packageName: "sovrin-deb"
statusCheck:
name: statusCheck
runs-on: ubuntu-latest
needs: [workflow-setup, call-indy-test-automation]
if: ${{ needs.workflow-setup.outputs.testsNeeded == 'false' || success() }}
steps:
- run: 'echo "Just a status Check (Always true, when executed) for branch protection rules(blocks merging while test are running and if tests fail)." '