From 366f87b22b8ea3b1faa02439838fc31fe0d82f8e Mon Sep 17 00:00:00 2001 From: Oleg339 <44521022+Oleg339@users.noreply.github.com> Date: Mon, 7 Nov 2022 15:25:19 +0300 Subject: [PATCH 1/3] Create github-actions-demo.yml --- .github/workflows/github-actions-demo.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/github-actions-demo.yml diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml new file mode 100644 index 0000000..e007988 --- /dev/null +++ b/.github/workflows/github-actions-demo.yml @@ -0,0 +1,18 @@ +name: GitHub Actions Demo +run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 +on: [push] +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code + uses: actions/checkout@v3 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." From 8380780fb00feefd59ee6df53f4f786714b7a64f Mon Sep 17 00:00:00 2001 From: Oleg339 <44521022+Oleg339@users.noreply.github.com> Date: Mon, 7 Nov 2022 15:42:08 +0300 Subject: [PATCH 2/3] Update github-actions-demo.yml --- .github/workflows/github-actions-demo.yml | 32 +++++++++++++---------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index e007988..fc7ceae 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -1,18 +1,22 @@ -name: GitHub Actions Demo -run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 -on: [push] +name: localstack-action-example +on: push jobs: - Explore-GitHub-Actions: + example-job: runs-on: ubuntu-latest steps: - - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - name: Check out repository code - uses: actions/checkout@v3 - - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code on the runner." - - name: List files in the repository + - name: Start LocalStack + env: + LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} run: | - ls ${{ github.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." + pip install localstack awscli-local[ver1] # install LocalStack cli and awslocal + docker pull localstack/localstack # Make sure to pull the latest version of the image + localstack start -d # Start LocalStack in the background + + echo "Waiting for LocalStack startup..." # Wait 30 seconds for the LocalStack container + localstack wait -t 30 # to become ready before timing out + echo "Startup complete" + - name: Run some Tests against LocalStack + run: | + awslocal s3 mb s3://test + awslocal s3 ls + echo "Test Execution complete!" From b70e6fcd5095a4d3aebe4d54977b73507d3921f0 Mon Sep 17 00:00:00 2001 From: Oleg339 <44521022+Oleg339@users.noreply.github.com> Date: Mon, 7 Nov 2022 15:55:39 +0300 Subject: [PATCH 3/3] 12 --- .github/workflows/github-actions-demo.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index fc7ceae..ad325ed 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -19,4 +19,5 @@ jobs: run: | awslocal s3 mb s3://test awslocal s3 ls + awslocal s3 ls echo "Test Execution complete!"