Bump actions/setup-node from 4.0.4 to 4.1.0 #865
Workflow file for this run
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: Test iamlive action | |
on: | |
push: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
check-dist: | |
name: Check dist | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: read | |
steps: | |
- name: Check out code | |
uses: actions/[email protected] | |
- name: Setup Node | |
uses: actions/[email protected] | |
with: | |
node-version: '20' | |
- name: Setup pnpm | |
run: npm install --location=global pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Check diff is up to date | |
run: | | |
pnpm build | |
git diff --quiet -- dist || { | |
echo "::error::The ./dist is outdated, run 'pnpm build' and commit" | |
exit 1 | |
} | |
utilize: | |
name: Use iamlive action | |
runs-on: ubuntu-22.04 | |
needs: [check-dist] | |
permissions: | |
contents: read | |
env: | |
AWS_CSM_ENABLED: 'true' | |
strategy: | |
fail-fast: true | |
matrix: | |
iamliveVersion: [v1.1.8, v1.1.11] | |
steps: | |
- name: Check out code | |
uses: actions/[email protected] | |
- name: Setup Node | |
uses: actions/[email protected] | |
with: | |
node-version: '20' | |
- name: Setup Python | |
uses: actions/[email protected] | |
with: | |
python-version: '3.x' | |
- name: Setup iamlive | |
id: setup-iamlive | |
uses: ./ | |
with: | |
iamlive-version: ${{ matrix.iamliveVersion }} | |
auto-capture: true | |
output-file: ./test-policy-${{ matrix.iamliveVersion }}.json | |
- name: Check output and installPath | |
run: | | |
[ "${IAMLIVE_VERSION}" == ${{ matrix.iamliveVersion }} ] || { echo >&2 "::error::Expected ${{ matrix.iamliveVersion }} to be installed."; exit 1; } | |
hash iamlive 2>/dev/null || { echo >&2 "iamlive can not be found in the PATH."; exit 1; } | |
echo "::notice::Installed iamlive ${IAMLIVE_VERSION} at $(which iamlive)" | |
env: | |
IAMLIVE_VERSION: ${{ steps.setup-iamlive.outputs.iamlive-version }} | |
- name: Setup LocalStack | |
run: | | |
pip install localstack awscli-local[ver1] | |
docker pull localstack/localstack | |
localstack start -d | |
echo "Waiting for LocalStack startup..." | |
localstack wait -t 30 | |
echo "Startup complete" | |
- name: Call a bunch of aws apis | |
run: | | |
awslocal s3 mb s3://test | |
awslocal s3 ls | |
- name: Is iamlive still running | |
run: ps aux | grep iamlive | |
assert: | |
name: Assert policy | |
runs-on: ubuntu-22.04 | |
needs: [utilize] | |
strategy: | |
fail-fast: true | |
matrix: | |
iamliveVersion: [v1.1.8, v1.1.11] | |
steps: | |
- name: download-policy | |
uses: actions/[email protected] | |
with: | |
name: test-policy-${{ matrix.iamliveVersion }}.json | |
- name: check-policy | |
run: | | |
echo "assert policy has file" | |
cat test-policy-${{ matrix.iamliveVersion }}.json | |
cat test-policy-${{ matrix.iamliveVersion }}.json | grep 's3:CreateBucket' | |
cat test-policy-${{ matrix.iamliveVersion }}.json | grep 's3:ListAllMyBuckets' |