chore: fix for old aws account id (#149)
* chore: fix for old aws account id * chore: fix for old aws account id * chore: test with changed branch * chore: test with changed branch * chore: test with install dependencies * chore: prepare to pr
This commit is contained in:
committed by
GitHub
parent
53ae0729ed
commit
e413284017
17
.github/actions/setup_env/action.yaml
vendored
17
.github/actions/setup_env/action.yaml
vendored
@@ -1,6 +1,17 @@
|
||||
name: Setup/Cache Env
|
||||
description: 'Sets up and caches a python env. Will only install dependencies if no cache was hit.'
|
||||
|
||||
inputs:
|
||||
role-to-assume:
|
||||
required: true
|
||||
description: 'The role to assume'
|
||||
aws-region:
|
||||
required: true
|
||||
description: 'The aws region to use'
|
||||
domain-owner:
|
||||
required: true
|
||||
description: 'The domain owner'
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
@@ -19,14 +30,14 @@ runs:
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v4.0.1
|
||||
with:
|
||||
role-to-assume: arn:aws:iam::827659017777:role/github-actions
|
||||
role-to-assume: ${{ inputs.role-to-assume }}
|
||||
audience: sts.amazonaws.com
|
||||
aws-region: eu-central-1
|
||||
aws-region: ${{ inputs.aws-region }}
|
||||
|
||||
- name: Install Dependencies
|
||||
if: ${{ steps.env-cache.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
aws codeartifact login --tool pip --domain propeller --domain-owner 827659017777 --repository protosim
|
||||
aws codeartifact login --tool pip --domain propeller --domain-owner ${{inputs.domain-owner}} --repository protosim
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r propeller-swap-encoders/requirements.txt --no-cache
|
||||
shell: bash
|
||||
|
||||
35
.github/workflows/python-tests.yaml
vendored
35
.github/workflows/python-tests.yaml
vendored
@@ -11,6 +11,13 @@ on:
|
||||
required: false
|
||||
type: number
|
||||
default: 15
|
||||
secrets:
|
||||
role-to-assume:
|
||||
required: true
|
||||
aws-region:
|
||||
required: true
|
||||
domain-owner:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
test-python:
|
||||
@@ -22,8 +29,32 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Env
|
||||
uses: ./.github/actions/setup_env
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.9"
|
||||
|
||||
- name: Cache Env
|
||||
uses: actions/cache@v3
|
||||
id: env-cache
|
||||
with:
|
||||
path: ${{ env.pythonLocation }}
|
||||
key: ${{ env.pythonLocation }}-${{ hashFiles('./propeller-swap-encoders/requirements.txt') }}
|
||||
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v4.0.1
|
||||
with:
|
||||
role-to-assume: ${{ secrets.role-to-assume }}
|
||||
audience: sts.amazonaws.com
|
||||
aws-region: ${{ secrets.aws-region }}
|
||||
|
||||
- name: Install Dependencies
|
||||
if: ${{ steps.env-cache.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
aws codeartifact login --tool pip --domain propeller --domain-owner ${{secrets.domain-owner}} --repository protosim
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r propeller-swap-encoders/requirements.txt --no-cache
|
||||
shell: bash
|
||||
|
||||
- name: Test with pytest
|
||||
id: tests
|
||||
|
||||
8
.github/workflows/swap-encoders.yaml
vendored
8
.github/workflows/swap-encoders.yaml
vendored
@@ -13,6 +13,10 @@ env:
|
||||
jobs:
|
||||
tests:
|
||||
uses: propeller-heads/tycho-protocol-sdk/.github/workflows/python-tests.yaml@main
|
||||
secrets:
|
||||
role-to-assume: ${{ secrets.ROLE_TO_ASSUME }}
|
||||
aws-region: ${{ secrets.AWS_REGION }}
|
||||
domain-owner: ${{ secrets.DOMAIN_OWNER }}
|
||||
|
||||
formatting:
|
||||
name: Formatting
|
||||
@@ -26,6 +30,10 @@ jobs:
|
||||
|
||||
- name: Setup Env
|
||||
uses: ./.github/actions/setup_env
|
||||
with:
|
||||
role-to-assume: ${{ secrets.ROLE_TO_ASSUME }}
|
||||
aws-region: ${{ secrets.AWS_REGION }}
|
||||
domain-owner: ${{ secrets.DOMAIN_OWNER }}
|
||||
|
||||
- name: Black Formatting
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user