test: update pulumi test #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dynamic Test Execution | |
on: [push] | |
jobs: | |
prepare-execution-matrix: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Prepare Execution Matrix | |
id: set-matrix | |
run: | | |
EXEC_FILES=$(find tests -type f -executable | jq -R -s -c 'split("\n")[:-1]') | |
echo 'MATRIX<<EOF' >> $GITHUB_OUTPUT | |
echo $EXEC_FILES >> $GITHUB_OUTPUT | |
echo 'EOF' >> $GITHUB_OUTPUT | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.MATRIX }} | |
execute-scripts: | |
needs: prepare-execution-matrix | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
script: ${{ fromJson(needs.prepare-execution-matrix.outputs.matrix) }} | |
services: | |
localstack: | |
image: localstack/localstack | |
ports: | |
- 4566:4566 | |
env: | |
SERVICES: "s3,ec2,cloudformation" | |
DEFAULT_REGION: "us-east-1" | |
AWS_ACCESS_KEY_ID: "test" | |
AWS_SECRET_ACCESS_KEY: "test" | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Set up Bun | |
run: | | |
curl -fsSL https://bun.sh/install | bash | |
echo "$HOME/.bun/bin" >> $GITHUB_PATH | |
- name: Install AWS CLI | |
run: pip install awscli | |
- name: Execute Script | |
run: ./${{ matrix.script }} |