-
-
Notifications
You must be signed in to change notification settings - Fork 3
98 lines (84 loc) · 3.36 KB
/
d-asa-ci.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
name: Validate d-asa
on:
workflow_call:
pull_request:
# If not specified, types includes by default [opened, reopened, synchronize]
# This next line should be used in conjunction with the if statement that prevents CI jobs to run on draft PRs.
# ready_for_review is then added to make sure that a PR with no code change triggers CI if it's no longer a draft PR.
types: [ opened, reopened, synchronize, ready_for_review ]
permissions:
contents: read
jobs:
validate:
name: Validate d-asa
# Preventing a job from running on draft PRs.
if: '! github.event.pull_request.draft'
runs-on: "ubuntu-latest"
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Set up AlgoKit
uses: ./.github/actions/algokit-setup
- name: Audit python dependencies
run: algokit project run audit
- name: Lint and format python dependencies
run: algokit project run lint
- name: Detect changes
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
base-d-asa:
- 'smart_contracts/_helpers/**'
- 'smart_contracts/artifacts/base_d_asa/**'
zero-coupon-bond:
- 'smart_contracts/_helpers/**'
- 'smart_contracts/artifacts/zero_coupon_bond/**'
fixed-coupon-bond:
- 'smart_contracts/_helpers/**'
- 'smart_contracts/artifacts/fixed_coupon_bond/**'
perpetual-bond:
- 'smart_contracts/_helpers/**'
- 'smart_contracts/artifacts/perpetual_bond/**'
test-base-d-asa:
- 'tests/conftest.py'
- 'tests/base_d_asa/**'
test-zero-coupon-bond:
- 'tests/conftest.py'
- 'tests/zero-coupon-bond/**'
test-fixed-coupon-bond:
- 'tests/conftest.py'
- 'tests/fixed_coupon_bond/**'
test-perpetual-bond:
- 'tests/conftest.py'
- 'tests/perpetual_bond/**'
- name: Run Base D-ASA tests
if: steps.filter.outputs.base-d-asa == 'true' || steps.filter.outputs.test-base-d-asa == 'true'
shell: bash
run: |
set -o pipefail
algokit project run test tests/base_d_asa
- name: Run Zero Coupon Bond tests
if: steps.filter.outputs.zero-coupon-bond == 'true' || steps.filter.outputs.test-zero-coupon-bond == 'true'
shell: bash
run: |
set -o pipefail
algokit project run test tests/zero_coupon_bond
- name: Run Fixed Coupon Bond tests
if: steps.filter.outputs.fixed-coupon-bond == 'true' || steps.filter.outputs.test-fixed-coupon-bond == 'true'
shell: bash
run: |
set -o pipefail
algokit project run test tests/fixed_coupon_bond
- name: Run Perpetual Bond tests
if: steps.filter.outputs.perpetual-bond == 'true' || steps.filter.outputs.test-perpetual-bond == 'true'
shell: bash
run: |
set -o pipefail
algokit project run test tests/perpetual_bond
- name: Build smart contracts
run: algokit project run build
- name: Check output stability of the smart contracts
run: algokit project run ci-teal-diff
- name: Run deployer against LocalNet
run: algokit project deploy localnet