|
1 | 1 | # This workflow will be triggered on merge to the main branch if |
2 | 2 | # aws-lambda-java-runtime-interface-client package was changed |
3 | 3 | # |
4 | | -# It will publish artifacts to CodeArtifact repository, specified by properties defined in GitHub repo secrets: |
5 | | -# CODE_ARTIFACT_REPO_ACCOUNT, AWS_REGION, CODE_ARTIFACT_REPO_NAME, CODE_ARTIFACT_DOMAIN |
6 | | -# and will assume role specified by AWS_ROLE |
7 | | -# |
8 | | -# Prerequisite setup: |
9 | | -# https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services |
| 4 | +# It measures unit-test coverage on both native architectures and uploads it to |
| 5 | +# Codecov. |
10 | 6 |
|
11 | | -name: Publish artifact for aws-lambda-java-runtime-interface-client |
| 7 | +name: Coverage for aws-lambda-java-runtime-interface-client |
12 | 8 |
|
13 | 9 | on: |
14 | 10 | workflow_dispatch: |
|
20 | 16 |
|
21 | 17 | jobs: |
22 | 18 |
|
23 | | - publish: |
24 | | - runs-on: ubuntu-latest |
25 | | - |
26 | | - permissions: |
27 | | - id-token: write |
28 | | - contents: read |
29 | | - |
30 | | - steps: |
31 | | - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
32 | | - |
33 | | - - name: Set up JDK 1.8 |
34 | | - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 |
35 | | - with: |
36 | | - java-version: 8 |
37 | | - distribution: corretto |
38 | | - cache: maven |
39 | | - |
40 | | - - name: Set up QEMU |
41 | | - uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3 |
42 | | - |
43 | | - - name: Set up Docker Buildx |
44 | | - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 |
45 | | - with: |
46 | | - install: true |
47 | | - |
48 | | - - name: Available buildx platforms |
49 | | - run: echo ${{ steps.buildx.outputs.platforms }} |
50 | | - |
51 | | - - name: Build and install serialization dependency locally |
52 | | - working-directory: ./aws-lambda-java-serialization |
53 | | - run: mvn clean install |
54 | | - |
55 | | - - name: Test Runtime Interface Client xplatform build - Run 'build' target |
56 | | - working-directory: ./aws-lambda-java-runtime-interface-client |
57 | | - run: make build |
58 | | - env: |
59 | | - IS_JAVA_8: true |
60 | | - |
61 | | - - name: Issue AWS credentials |
62 | | - if: env.ENABLE_SNAPSHOT != null |
63 | | - env: |
64 | | - ENABLE_SNAPSHOT: ${{ secrets.ENABLE_SNAPSHOT }} |
65 | | - uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4 |
66 | | - with: |
67 | | - aws-region: ${{ secrets.AWS_REGION }} |
68 | | - role-to-assume: ${{ secrets.AWS_ROLE }} |
69 | | - role-session-name: GitHubActionsPublishPackage |
70 | | - role-duration-seconds: 900 |
71 | | - |
72 | | - - name: Prepare codeartifact properties |
73 | | - if: env.ENABLE_SNAPSHOT != null |
74 | | - env: |
75 | | - ENABLE_SNAPSHOT: ${{ secrets.ENABLE_SNAPSHOT }} |
76 | | - working-directory: ./aws-lambda-java-runtime-interface-client/ric-dev-environment |
77 | | - run: | |
78 | | - cat <<EOF > codeartifact-properties.mk |
79 | | - CODE_ARTIFACT_REPO_ACCOUNT=${{ secrets.AWS_ACCOUNT }} |
80 | | - CODE_ARTIFACT_REPO_REGION=${{ env.AWS_REGION }} |
81 | | - CODE_ARTIFACT_REPO_NAME=${{ secrets.CODE_ARTIFACT_REPO_NAME }} |
82 | | - CODE_ARTIFACT_DOMAIN=${{ secrets.AWS_CODEARTIFACT_DOMAIN }} |
83 | | - EOF |
84 | | -
|
85 | | - - name: Publish |
86 | | - if: env.ENABLE_SNAPSHOT != null |
87 | | - working-directory: ./aws-lambda-java-runtime-interface-client |
88 | | - env: |
89 | | - ENABLE_SNAPSHOT: ${{ secrets.ENABLE_SNAPSHOT }} |
90 | | - run: make publish |
91 | | - |
92 | 19 | # Coverage is measured on both native architectures (x86_64 and aarch64) so |
93 | 20 | # the coverage recorded for a merge to main matches what the PR build recorded |
94 | 21 | # (the union of both archs). Uploading a single x86_64 report here previously |
|
0 commit comments