2424concurrency :
2525 group : ${{ github.workflow }}-${{ github.ref }}-${{ inputs.name }}
2626 cancel-in-progress : true
27-
27+
2828jobs :
2929 linux :
30- name : Example/${{ matrix.examples }} on Linux ${{ matrix.swift.swift_version }}
30+ name : Example/${{ matrix.examples }} on Linux ${{ matrix.swift.swift_version }}
3131 runs-on : ubuntu-latest
3232 strategy :
3333 fail-fast : false
3434 matrix :
3535 # 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"]
3737 # examples: ${{ inputs.examples }}
3838
39- # We are using only one Swift version
39+ # We are using only one Swift version
4040 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"
4343 container :
4444 image : ${{ matrix.swift.image }}
4545 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 }}
4656
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:
5759
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
6362
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
6867
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}
7372
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