Skip to content

Commit

Permalink
Update GitHub Actions (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
bnusunny authored Sep 17, 2024
1 parent a9ce894 commit 0b54465
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 63 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @awslabs/aws-lambda-adapter-maintainers
113 changes: 50 additions & 63 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,18 @@ jobs:
uses: actions/checkout@v3

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
targets: x86_64-unknown-linux-musl,aarch64-unknown-linux-musl
run: |
rustup target add x86_64-unknown-linux-musl
rustup target add aarch64-unknown-linux-musl
- uses: korandoru/setup-zig@v1
with:
zig-version: 0.11.0
- name: Install cargo lambda
run: pip3 install cargo-lambda

- name: Configure cache
uses: mozilla-actions/[email protected]

- uses: taiki-e/install-action@nextest
- name: Install cargo-nextest
run: cargo install cargo-nextest --locked

- name: linting
run: |
Expand All @@ -88,26 +87,18 @@ jobs:
- uses: aws-actions/setup-sam@v2

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-musl,aarch64-unknown-linux-musl
run: |
rustup target add x86_64-unknown-linux-musl
rustup target add aarch64-unknown-linux-musl
- uses: korandoru/setup-zig@v1
with:
zig-version: 0.11.0
- name: Install cargo lambda
run: pip3 install cargo-lambda

- name: Configure cache
uses: mozilla-actions/[email protected]

- uses: taiki-e/install-action@nextest

- name: Install Cargo Lambda
uses: jaxxstorm/[email protected]
with:
repo: cargo-lambda/cargo-lambda
tag: v1.0.1
platform: linux
arch: x86_64
- name: Install cargo-nextest
run: cargo install cargo-nextest --locked

- name: Add cargo pkg version to env vars
run: |
Expand All @@ -119,7 +110,7 @@ jobs:
- name: Tar files
run: tar -cvf build-x86_64.tar build-x86_64

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: aws-sam-build-x86_64
path: build-x86_64.tar
Expand All @@ -130,7 +121,7 @@ jobs:
- name: Tar files
run: tar -cvf build-arm64.tar build-arm64

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: aws-sam-build-arm64
path: build-arm64.tar
Expand Down Expand Up @@ -179,7 +170,7 @@ jobs:
--region ${BETA_REGION} \
--output-template-file packaged-beta-x86_64.yaml
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: packaged-beta-x86_64.yaml
path: packaged-beta-x86_64.yaml
Expand All @@ -201,7 +192,7 @@ jobs:
--region ${BETA_REGION} \
--output-template-file packaged-beta-arm64.yaml
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: packaged-beta-arm64.yaml
path: packaged-beta-arm64.yaml
Expand Down Expand Up @@ -294,19 +285,17 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
targets: x86_64-unknown-linux-musl
run: |
rustup target add x86_64-unknown-linux-musl
- uses: korandoru/setup-zig@v1
with:
zig-version: 0.11.0
- name: Install cargo lambda
run: pip3 install cargo-lambda

- name: Configure cache
uses: mozilla-actions/[email protected]

- uses: taiki-e/install-action@nextest
- name: Install cargo-nextest
run: cargo install cargo-nextest --locked

- uses: actions/checkout@v3

Expand Down Expand Up @@ -344,12 +333,12 @@ jobs:
--no-fail-on-empty-changeset \
--role-arn ${BETA_CLOUDFORMATION_EXECUTION_ROLE}
- uses: dkershner6/aws-ssm-getparameters-action@v1
with:
parameterPairs: "/lambda-web-adapter/e2e/httpbin/zip/rest-api-endpoint = HTTPBIN_ZIP_REST_ENDPOINT,
/lambda-web-adapter/e2e/httpbin/zip/http-api-endpoint = HTTPBIN_ZIP_HTTP_ENDPOINT,
/lambda-web-adapter/e2e/httpbin/zip/alb-endpoint = HTTPBIN_ZIP_ALB_ENDPOINT,
/lambda-web-adapter/e2e/httpbin/zip/function-url = HTTPBIN_ZIP_FURL_ENDPOINT"
- name: retrive ssm parameters
run: |
export HTTPBIN_ZIP_REST_ENDPOINT=$(aws ssm get-parameter --name "/lambda-web-adapter/e2e/httpbin/zip/rest-api-endpoint" --query "Parameter.Value" --output text)
export HTTPBIN_ZIP_HTTP_ENDPOINT=$(aws ssm get-parameter --name "/lambda-web-adapter/e2e/httpbin/zip/http-api-endpoint" --query "Parameter.Value" --output text)
export HTTPBIN_ZIP_ALB_ENDPOINT=$(aws ssm get-parameter --name "/lambda-web-adapter/e2e/httpbin/zip/alb-endpoint" --query "Parameter.Value" --output text)
export HTTPBIN_ZIP_FURL_ENDPOINT=$(aws ssm get-parameter --name "/lambda-web-adapter/e2e/httpbin/zip/function-url" --query "Parameter.Value" --output text)
- name: run e2e tests
run: |
Expand All @@ -365,19 +354,17 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
targets: x86_64-unknown-linux-musl
run: |
rustup target add x86_64-unknown-linux-musl
- uses: korandoru/setup-zig@v1
with:
zig-version: 0.11.0
- name: Install cargo lambda
run: pip3 install cargo-lambda

- name: Configure cache
uses: mozilla-actions/[email protected]

- uses: taiki-e/install-action@nextest
- name: Install cargo-nextest
run: cargo install cargo-nextest --locked

- uses: actions/checkout@v3

Expand Down Expand Up @@ -416,12 +403,12 @@ jobs:
--no-fail-on-empty-changeset \
--role-arn ${BETA_CLOUDFORMATION_EXECUTION_ROLE}
- uses: dkershner6/aws-ssm-getparameters-action@v1
with:
parameterPairs: "/lambda-web-adapter/e2e/httpbin/oci/rest-api-endpoint = HTTPBIN_OCI_REST_ENDPOINT,
/lambda-web-adapter/e2e/httpbin/oci/http-api-endpoint = HTTPBIN_OCI_HTTP_ENDPOINT,
/lambda-web-adapter/e2e/httpbin/oci/alb-endpoint = HTTPBIN_OCI_ALB_ENDPOINT,
/lambda-web-adapter/e2e/httpbin/oci/function-url = HTTPBIN_OCI_FURL_ENDPOINT"
- name: retrive ssm parameters
run: |
export HTTPBIN_OCI_REST_ENDPOINT=$(aws ssm get-parameter --name "/lambda-web-adapter/e2e/httpbin/oci/rest-api-endpoint" --query "Parameter.Value" --output text)
export HTTPBIN_OCI_HTTP_ENDPOINT=$(aws ssm get-parameter --name "/lambda-web-adapter/e2e/httpbin/oci/http-api-endpoint" --query "Parameter.Value" --output text)
export HTTPBIN_OCI_ALB_ENDPOINT=$(aws ssm get-parameter --name "/lambda-web-adapter/e2e/httpbin/oci/alb-endpoint" --query "Parameter.Value" --output text)
export HTTPBIN_OCI_FURL_ENDPOINT=$(aws ssm get-parameter --name "/lambda-web-adapter/e2e/httpbin/oci/function-url" --query "Parameter.Value" --output text)
- name: run e2e tests
run: |
Expand Down Expand Up @@ -522,7 +509,7 @@ jobs:
--region ${{ matrix.region }} \
--output-template-file packaged-gamma-x86_64-${{ matrix.region }}.yaml
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: packaged-gamma-x86_64-${{ matrix.region }}.yaml
path: packaged-gamma-x86_64-${{ matrix.region }}.yaml
Expand All @@ -544,7 +531,7 @@ jobs:
--region ${{ matrix.region }} \
--output-template-file packaged-gamma-arm64-${{ matrix.region }}.yaml
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: packaged-gamma-arm64-${{ matrix.region }}.yaml
path: packaged-gamma-arm64-${{ matrix.region }}.yaml
Expand Down Expand Up @@ -595,7 +582,7 @@ jobs:
--region ${{ matrix.region }} \
--output-template-file packaged-prod-x86_64-${{ matrix.region }}.yaml
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: packaged-prod-x86_64-${{ matrix.region }}.yaml
path: packaged-prod-x86_64-${{ matrix.region }}.yaml
Expand All @@ -617,7 +604,7 @@ jobs:
--region ${{ matrix.region }} \
--output-template-file packaged-prod-arm64-${{ matrix.region }}.yaml
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: packaged-prod-arm64-${{ matrix.region }}.yaml
path: packaged-prod-arm64-${{ matrix.region }}.yaml
Expand Down Expand Up @@ -670,7 +657,7 @@ jobs:
--region ${{ matrix.region }} \
--output-template-file packaged-china-gamma-x86_64-${{ matrix.region }}.yaml
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: packaged-china-gamma-x86_64-${{ matrix.region }}.yaml
path: packaged-china-gamma-x86_64-${{ matrix.region }}.yaml
Expand All @@ -692,7 +679,7 @@ jobs:
--region ${{ matrix.region }} \
--output-template-file packaged-china-gamma-arm64-${{ matrix.region }}.yaml
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: packaged-china-gamma-arm64-${{ matrix.region }}.yaml
path: packaged-china-gamma-arm64-${{ matrix.region }}.yaml
Expand Down Expand Up @@ -746,7 +733,7 @@ jobs:
--region ${{ matrix.region }} \
--output-template-file packaged-china-prod-x86_64-${{ matrix.region }}.yaml
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: packaged-china-prod-x86_64-${{ matrix.region }}.yaml
path: packaged-china-prod-x86_64-${{ matrix.region }}.yaml
Expand All @@ -768,7 +755,7 @@ jobs:
--region ${{ matrix.region }} \
--output-template-file packaged-china-prod-arm64-${{ matrix.region }}.yaml
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: packaged-china-prod-arm64-${{ matrix.region }}.yaml
path: packaged-china-prod-arm64-${{ matrix.region }}.yaml
Expand Down

0 comments on commit 0b54465

Please sign in to comment.