Goal is simple: to run pytest test suite against remote aws lambdas. it works locally as aws is configured properly, but having trouble reproducing in circleci runner. config.yml:
version: 2.1
orbs:
python: circleci/python@2.1.1
aws-cli: circleci/aws-cli@3.1.3
executors:
python:
docker:
- image: circleci/python:3.9.1
resource_class: small
parameters:
tag:
default: '3.9'
type: string
aws:
docker:
- image: cimg/aws:2022.11
resource_class: small
parameters:
tag:
default: '3.9'
type: string
jobs:
configure-role-arn:
executor: aws
steps:
- aws-cli/setup:
profile-name: AWS_PROFILE_NAME
- persist_to_workspace:
root: /home/circleci/
paths:
- project
- .aws
build_and_test:
executor: python
steps:
- checkout
- attach_workspace:
at: /home/circleci/.aws
- python/install-packages:
pkg-manager: pip
pip-dependency-file: local_requirements.txt
- run: >-
cd ../.. && ls -R
- run:
name: Run functional tests
command: |
python -m pytest
- store_test_results:
path: test-reports
workflows:
build_and_test:
jobs:
- configure-role-arn
- build_and_test:
requires:
- configure-role-arn
I am seeing that something is being persisted_to_workspace (306 bytes) but cannot ls
anything in a run command to see what is being saved. Similarly, i see that the workspace is attached in the pytest job, but cannot see the .aws
folder when running the ls -R
command.
I believe there has to be an easier way – copying over the .aws folder shouldn’t be so tedious. I’m trying to utilize orbs to keep things simple, but am perhaps missing something.
Any help is greatly appreciated.