-
Notifications
You must be signed in to change notification settings - Fork 14
103 lines (87 loc) · 2.92 KB
/
aws-proxy.yml
File metadata and controls
103 lines (87 loc) · 2.92 KB
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
102
103
name: LocalStack AWS Proxy Extension Tests
on:
# TODO: temporarily disabled - AWS proxy codebase needs to be fixed, to accommodate recent
# changes in CLI and runtime repos, see: https://github.com/localstack/localstack/pull/13704
# push:
# paths:
# - aws-proxy/**
# branches:
# - main
# pull_request:
# paths:
# - .github/workflows/aws-proxy.yml
# - aws-proxy/**
workflow_dispatch:
jobs:
tests-aws-proxy:
name: Run extension tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: '3.13'
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Enable Corepack and set Yarn version
run: |
corepack enable
corepack prepare yarn@3.2.3 --activate
shell: bash
- name: Set up Terraform CLI
uses: hashicorp/setup-terraform@v2
- name: Run linter
run: |
cd aws-proxy
make install
make lint
- name: Install LocalStack and extension
env:
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
run: |
set -e
cd aws-proxy
docker pull localstack/localstack-pro &
docker pull public.ecr.aws/lambda/python:3.8 &
# install latest CLI packages
pip install --upgrade localstack localstack-ext
# install dependencies
sudo apt-get update
sudo apt-get install -y libsasl2-dev
# build and install extension
localstack extensions init
(
make build
make enable
)
# install awslocal/tflocal command lines
pip install awscli-local[ver1]
pip install terraform-local
find /home/runner/.cache/localstack/volume/lib/extensions/python_venv/lib/python3.*/site-packages/aws*
ls -la /home/runner/.cache/localstack/volume/lib/extensions/python_venv/lib/python3.*/site-packages/aws*
DEBUG=1 GATEWAY_SERVER=hypercorn localstack start -d
localstack wait
- name: Run integration tests
env:
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.TEST_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY }}
run: |
cd aws-proxy
make test
- name: Deploy and test sample app
env:
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.TEST_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY }}
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
run: |
cd aws-proxy/example
make test
- name: Print LocalStack logs
if: always()
run: localstack logs