|
| 1 | +name: AIO App CI |
| 2 | + |
| 3 | +on: [pull_request, push] |
| 4 | +jobs: |
| 5 | + test: |
| 6 | + name: Test PR |
| 7 | + runs-on: ${{ matrix.os }} |
| 8 | + strategy: |
| 9 | + matrix: |
| 10 | + node-version: ['20'] |
| 11 | + os: [macOS-latest, ubuntu-latest, windows-latest] |
| 12 | + steps: |
| 13 | + - name: Checkout |
| 14 | + uses: actions/checkout@v4 |
| 15 | + |
| 16 | + - name: Prepare Context (Linux/macOS) |
| 17 | + if: runner.os != 'Windows' |
| 18 | + run: mv -f Webhooks/* . |
| 19 | + - name: Prepare Context (Windows) |
| 20 | + if: runner.os == 'Windows' |
| 21 | + run: | |
| 22 | + $source = "Webhooks\*" |
| 23 | + $destination = "." |
| 24 | + $files = Get-ChildItem -Path $source |
| 25 | + foreach ($file in $files) { |
| 26 | + $destPath = Join-Path -Path $destination -ChildPath $file.Name |
| 27 | + if (Test-Path -Path $destPath) { |
| 28 | + Remove-Item -Path $destPath -Recurse -Force |
| 29 | + } |
| 30 | + } |
| 31 | + Move-Item -Path $source -Destination $destination -Force |
| 32 | +
|
| 33 | + - name: Use Node.js ${{ matrix.node-version }} |
| 34 | + uses: actions/setup-node@v4 |
| 35 | + with: |
| 36 | + node-version: ${{ matrix.node-version }} |
| 37 | + - name: npm install |
| 38 | + run: npm i |
| 39 | + - name: Setup CLI |
| 40 | + uses: adobe/aio-cli-setup-action@1.3.0 |
| 41 | + with: |
| 42 | + os: ${{ matrix.os }} |
| 43 | + version: 10.x.x |
| 44 | + - name: Auth |
| 45 | + uses: adobe/aio-apps-action@3.3.0 |
| 46 | + with: |
| 47 | + os: ${{ matrix.os }} |
| 48 | + command: oauth_sts |
| 49 | + CLIENTID: ${{ secrets.CLIENTID_STAGE }} |
| 50 | + CLIENTSECRET: ${{ secrets.CLIENTSECRET_STAGE }} |
| 51 | + TECHNICALACCOUNTID: ${{ secrets.TECHNICALACCID_STAGE }} |
| 52 | + TECHNICALACCOUNTEMAIL: ${{ secrets.TECHNICALACCEMAIL_STAGE }} |
| 53 | + IMSORGID: ${{ secrets.IMSORGID_STAGE }} |
| 54 | + SCOPES: ${{ secrets.SCOPES_STAGE }} |
| 55 | + - name: Build |
| 56 | + env: |
| 57 | + AIO_RUNTIME_NAMESPACE: ${{ secrets.AIO_RUNTIME_NAMESPACE_STAGE }} |
| 58 | + uses: adobe/aio-apps-action@3.3.0 |
| 59 | + with: |
| 60 | + os: ${{ matrix.os }} |
| 61 | + command: build |
| 62 | + - name: Test |
| 63 | + uses: adobe/aio-apps-action@3.3.0 |
| 64 | + with: |
| 65 | + os: ${{ matrix.os }} |
| 66 | + command: test |
0 commit comments