24
24
concurrency :
25
25
group : ${{ github.workflow }}-${{ github.ref }}-${{ inputs.name }}
26
26
cancel-in-progress : true
27
-
27
+
28
28
jobs :
29
29
linux :
30
- name : Example/${{ matrix.examples }} on Linux ${{ matrix.swift.swift_version }}
30
+ name : Example/${{ matrix.examples }} on Linux ${{ matrix.swift.swift_version }}
31
31
runs-on : ubuntu-latest
32
32
strategy :
33
33
fail-fast : false
34
34
matrix :
35
35
# This should be passed as an argument in input. Can we pass arrays as argument ?
36
- examples : [ "HelloWorld", "APIGateway", "S3_AWSSDK", "S3_Soto" ]
36
+ examples : ["HelloWorld", "APIGateway", "S3_AWSSDK", "S3_Soto"]
37
37
# examples: ${{ inputs.examples }}
38
38
39
- # We are using only one Swift version
39
+ # We are using only one Swift version
40
40
swift :
41
- - image : ${{ inputs.matrix_linux_swift_container_image }}
42
- swift_version : " 6.0.1-amazonlinux2"
41
+ - image : ${{ inputs.matrix_linux_swift_container_image }}
42
+ swift_version : " 6.0.1-amazonlinux2"
43
43
container :
44
44
image : ${{ matrix.swift.image }}
45
45
steps :
46
+ # GitHub checkout action has a dep on NodeJS 20 which is not running on Amazonlinux2
47
+ # workaround is to manually checkout the repository
48
+ # https://github.com/actions/checkout/issues/1487
49
+ - name : Manually Clone repository and checkout PR
50
+ env :
51
+ PR_NUMBER : ${{ github.event.pull_request.number }}
52
+ run : |
53
+ # Clone the repository
54
+ git clone https://github.com/${{ github.repository }}
55
+ cd ${{ github.event.repository.name }}
46
56
47
- # GitHub checkout action has a dep on NodeJS 20 which is not running on Amazonlinux2
48
- # workaround is to manually checkout the repository
49
- # https://github.com/actions/checkout/issues/1487
50
- - name : Manually Clone repository and checkout PR
51
- env :
52
- PR_NUMBER : ${{ github.event.pull_request.number }}
53
- run : |
54
- # Clone the repository
55
- git clone https://github.com/${{ github.repository }}
56
- cd ${{ github.event.repository.name }}
57
+ # Fetch the pull request
58
+ git fetch origin +refs/pull/$PR_NUMBER/merge:
57
59
58
- # Fetch the pull request
59
- git fetch origin +refs/pull/$PR_NUMBER/merge:
60
-
61
- # Checkout the pull request
62
- git checkout -qf FETCH_HEAD
60
+ # Checkout the pull request
61
+ git checkout -qf FETCH_HEAD
63
62
64
- # - name: Checkout repository
65
- # uses: actions/checkout@v4
66
- # with:
67
- # persist-credentials: false
63
+ # - name: Checkout repository
64
+ # uses: actions/checkout@v4
65
+ # with:
66
+ # persist-credentials: false
68
67
69
- - name : Mark the workspace as safe
70
- working-directory : ${{ github.event.repository.name }} # until we can use action/checkout@v4
71
- # https://github.com/actions/checkout/issues/766
72
- run : git config --global --add safe.directory ${GITHUB_WORKSPACE}
68
+ - name : Mark the workspace as safe
69
+ working-directory : ${{ github.event.repository.name }} # until we can use action/checkout@v4
70
+ # https://github.com/actions/checkout/issues/766
71
+ run : git config --global --add safe.directory ${GITHUB_WORKSPACE}
73
72
74
- - name : Run matrix job
75
- working-directory : ${{ github.event.repository.name }} # until we can use action/checkout@v4
76
- env :
77
- SWIFT_VERSION : ${{ matrix.swift.swift_version }}
78
- COMMAND : ${{ inputs.matrix_linux_command }}
79
- EXAMPLE : ${{ matrix.examples }}
80
- run : |
81
- ./scripts/integration_tests.sh
73
+ - name : Run matrix job
74
+ working-directory : ${{ github.event.repository.name }} # until we can use action/checkout@v4
75
+ env :
76
+ SWIFT_VERSION : ${{ matrix.swift.swift_version }}
77
+ COMMAND : ${{ inputs.matrix_linux_command }}
78
+ EXAMPLE : ${{ matrix.examples }}
79
+ run : |
80
+ ./scripts/integration_tests.sh
0 commit comments