File tree Expand file tree Collapse file tree 3 files changed +55
-5
lines changed Expand file tree Collapse file tree 3 files changed +55
-5
lines changed Original file line number Diff line number Diff line change 1
1
name : Setup/Cache Env
2
2
description : ' Sets up and caches a python env. Will only install dependencies if no cache was hit.'
3
3
4
+ inputs :
5
+ role-to-assume :
6
+ required : true
7
+ description : ' The role to assume'
8
+ aws-region :
9
+ required : true
10
+ description : ' The aws region to use'
11
+ domain-owner :
12
+ required : true
13
+ description : ' The domain owner'
14
+
4
15
runs :
5
16
using : composite
6
17
steps :
@@ -19,14 +30,14 @@ runs:
19
30
- name : Configure AWS Credentials
20
31
uses : aws-actions/configure-aws-credentials@v4.0.1
21
32
with :
22
- role-to-assume : arn:aws:iam::827659017777: role/github-actions
33
+ role-to-assume : ${{ inputs. role-to-assume }}
23
34
audience : sts.amazonaws.com
24
- aws-region : eu-central-1
35
+ aws-region : ${{ inputs.aws-region }}
25
36
26
37
- name : Install Dependencies
27
38
if : ${{ steps.env-cache.outputs.cache-hit != 'true' }}
28
39
run : |
29
- aws codeartifact login --tool pip --domain propeller --domain-owner 827659017777 --repository protosim
40
+ aws codeartifact login --tool pip --domain propeller --domain-owner ${{inputs.domain-owner}} --repository protosim
30
41
python -m pip install --upgrade pip
31
42
pip install -r propeller-swap-encoders/requirements.txt --no-cache
32
43
shell : bash
Original file line number Diff line number Diff line change 11
11
required : false
12
12
type : number
13
13
default : 15
14
+ secrets :
15
+ role-to-assume :
16
+ required : true
17
+ aws-region :
18
+ required : true
19
+ domain-owner :
20
+ required : true
14
21
15
22
jobs :
16
23
test-python :
22
29
with :
23
30
fetch-depth : 0
24
31
25
- - name : Setup Env
26
- uses : ./.github/actions/setup_env
32
+ - name : Set up Python 3.9
33
+ uses : actions/setup-python@v4
34
+ with :
35
+ python-version : " 3.9"
36
+
37
+ - name : Cache Env
38
+ uses : actions/cache@v3
39
+ id : env-cache
40
+ with :
41
+ path : ${{ env.pythonLocation }}
42
+ key : ${{ env.pythonLocation }}-${{ hashFiles('./propeller-swap-encoders/requirements.txt') }}
43
+
44
+ - name : Configure AWS Credentials
45
+ uses : aws-actions/configure-aws-credentials@v4.0.1
46
+ with :
47
+ role-to-assume : ${{ secrets.role-to-assume }}
48
+ audience : sts.amazonaws.com
49
+ aws-region : ${{ secrets.aws-region }}
50
+
51
+ - name : Install Dependencies
52
+ if : ${{ steps.env-cache.outputs.cache-hit != 'true' }}
53
+ run : |
54
+ aws codeartifact login --tool pip --domain propeller --domain-owner ${{secrets.domain-owner}} --repository protosim
55
+ python -m pip install --upgrade pip
56
+ pip install -r propeller-swap-encoders/requirements.txt --no-cache
57
+ shell : bash
27
58
28
59
- name : Test with pytest
29
60
id : tests
Original file line number Diff line number Diff line change 13
13
jobs :
14
14
tests :
15
15
uses : propeller-heads/tycho-protocol-sdk/.github/workflows/python-tests.yaml@main
16
+ secrets :
17
+ role-to-assume : ${{ secrets.ROLE_TO_ASSUME }}
18
+ aws-region : ${{ secrets.AWS_REGION }}
19
+ domain-owner : ${{ secrets.DOMAIN_OWNER }}
16
20
17
21
formatting :
18
22
name : Formatting
26
30
27
31
- name : Setup Env
28
32
uses : ./.github/actions/setup_env
33
+ with :
34
+ role-to-assume : ${{ secrets.ROLE_TO_ASSUME }}
35
+ aws-region : ${{ secrets.AWS_REGION }}
36
+ domain-owner : ${{ secrets.DOMAIN_OWNER }}
29
37
30
38
- name : Black Formatting
31
39
run : |
You can’t perform that action at this time.
0 commit comments