From bb54a5d4d38e1304f585a803f195c56d4f266cea Mon Sep 17 00:00:00 2001 From: tdstein Date: Wed, 13 Sep 2023 12:05:37 -0400 Subject: [PATCH] Testing GitHub Actions --- .github/workflows/main.yaml | 1305 ++++++++++++++------------- .github/workflows/pull-request.yaml | 1305 ++++++++++++++------------- 2 files changed, 1320 insertions(+), 1290 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index ff02d5c8b1..838f2b2bb9 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -5,6 +5,8 @@ on: - main workflow_dispatch: + + # A note on debugging a github step: # You can ssh into the github action environment and poke around by using # https://github.com/marketplace/actions/debugging-with-tmate @@ -27,664 +29,677 @@ on: # - UX e2e tests jobs: - build-docker-image: + cache-keys: runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} + outputs: + dockerfile: ${{ steps.set-dockerfile.outputs['dockerfile'] }} + build-image.tar: ${{ steps.set-dockerfile.outputs['build-image.tar'] }} + package.json: ${{ steps.set-dockerfile.outputs['package.json'] }} steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Buildx - uses: docker/setup-buildx-action@v2 - - - name: Restore Cache docker image - id: cache-docker-image-restore - uses: actions/cache/restore@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/build-image.tar - key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('build/package/Dockerfile') }} - - - if: ${{ steps.cache-docker-image-restore.outputs.cache-hit != 'true' }} - name: Build and Export Docker Image - uses: docker/build-push-action@v3 - with: - context: . - build-args: BUILDKIT_INLINE_CACHE=1 - pull: True - file: build/package/Dockerfile - tags: rstudio/publishing-client:latest - outputs: type=docker,dest=/tmp/build-image.tar - - - if: ${{ steps.cache-docker-image-restore.outputs.cache-hit != 'true' }} - name: Cache docker image (update) - id: cache-docker-image-save - uses: actions/cache/save@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/build-image.tar - key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('build/package/Dockerfile') }} + - name: set-dockerfile + run: echo "dockerfile=${{ hashFiles('build/package/Dockerfile') }}" >> $GITHUB_OUTPUT + - name: set-image + run: echo "build-image.tar=${{ hashFiles('/tmp/build-image.tar') }}" >> $GITHUB_OUTPUT + - name: set-package.json + run: echo "package.json=${{ hashFiles('./web/package.json') }}" >> $GITHUB_OUTPUT - build-ux: - needs: build-docker-image - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Cache docker image (restore) - id: cache-docker-image - uses: actions/cache/restore@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/build-image.tar - key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} - - - name: Load Docker Image - run: | - docker load --input /tmp/build-image.tar - - - name: Restore Cache UX node_modules - id: node_modules - uses: actions/cache/restore@v3 - env: - cache-name: node-modules - with: - path: ./web/node_modules - key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} - - - if: ${{ steps.node_modules.outputs.cache-hit != 'true' }} - name: Build up node_modules - run: | - just web/bootstrap - - - if: ${{ steps.node_modules.outputs.cache-hit != 'true' }} - name: Create the cache of UX node_modules (save) - id: create_node_modules - uses: actions/cache/save@v3 - env: - cache-name: node-modules - with: - path: ./web/node_modules - key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} - - - name: Build the UX - run: | - just build-web - - - name: Upload Web-UX Artifacts - uses: actions/upload-artifact@v3 - with: - name: web-ux - path: ./web/dist - validate-codebase: - needs: build-ux - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Restore Cache docker image - id: cache-docker-image - uses: actions/cache/restore@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/build-image.tar - key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} - - - name: Load Docker Image - run: | - docker load --input /tmp/build-image.tar - - - name: Download Web-UX Artifacts - uses: actions/download-artifact@v3 - with: - name: web-ux - path: ./web/dist - - - name: Restore Cache UX node_modules - id: node_modules - uses: actions/cache/restore@v3 - env: - cache-name: node-modules - with: - path: ./web/node_modules - key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} - - - name: Validate the codebase - # Docker run will only fail step if last command fails... so must do multiple commands as one. - run: | - just validate + # build-docker-image: + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Buildx + # uses: docker/setup-buildx-action@v2 + # - + # name: Restore Cache docker image + # id: restore + # uses: actions/cache/restore@v3 + # with: + # path: /tmp/build-image.tar + # key: ${{ runner.os }}-docker-image-${{ env.CACHE_KEY_MODIFIER }}-${{ hashFiles('build/package/Dockerfile') }} + # - + # if: ${{ steps.restore.outputs.cache-hit != 'true' }} + # name: Build and Export Docker Image + # uses: docker/build-push-action@v3 + # with: + # context: . + # build-args: BUILDKIT_INLINE_CACHE=1 + # pull: True + # file: build/package/Dockerfile + # tags: rstudio/publishing-client:latest + # outputs: type=docker,dest=/tmp/build-image.tar + # - + # if: ${{ steps.restore.outputs.cache-hit != 'true' }} + # name: Cache docker image (update) + # id: cache-docker-image-save + # uses: actions/cache/save@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/build-image.tar + # key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('build/package/Dockerfile') }} - test-ux: - needs: build-ux - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Restore Cache docker image - id: cache-docker-image - uses: actions/cache/restore@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/build-image.tar - key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} - - - name: Load Docker Image - run: | - docker load --input /tmp/build-image.tar - - - name: Restore Cache UX node_modules - id: node_modules - uses: actions/cache/restore@v3 - env: - cache-name: node-modules - with: - path: ./web/node_modules - key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} - - - name: Download Web-UX Artifacts - uses: actions/download-artifact@v3 - with: - name: web-ux - path: ./web/dist - - - name: UX Unit Tests - run: | - just web/test-unit - - - name: UX Go Race Tests - run: | - just web/test-race + # build-ux: + # needs: build-docker-image + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: Cache docker image (restore) + # id: cache-docker-image + # uses: actions/cache/restore@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/build-image.tar + # key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} + # - + # name: Load Docker Image + # run: | + # docker load --input /tmp/build-image.tar + # - + # name: Restore Cache UX node_modules + # id: node_modules + # uses: actions/cache/restore@v3 + # env: + # cache-name: node-modules + # with: + # path: ./web/node_modules + # key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} + # - + # if: ${{ steps.node_modules.outputs.cache-hit != 'true' }} + # name: Build up node_modules + # run: | + # just web/bootstrap + # - + # if: ${{ steps.node_modules.outputs.cache-hit != 'true' }} + # name: Create the cache of UX node_modules (save) + # id: create_node_modules + # uses: actions/cache/save@v3 + # env: + # cache-name: node-modules + # with: + # path: ./web/node_modules + # key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} + # - + # name: Build the UX + # run: | + # just build-web + # - + # name: Upload Web-UX Artifacts + # uses: actions/upload-artifact@v3 + # with: + # name: web-ux + # path: ./web/dist - agent-tests: - needs: build-ux - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Restore Cache docker image - id: cache-docker-image - uses: actions/cache/restore@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/build-image.tar - key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} - - - name: Load Docker Image - run: | - docker load --input /tmp/build-image.tar - - - name: Download Web-UX SPA Artifacts - uses: actions/download-artifact@v3 - with: - name: web-ux - path: ./web/dist - - - name: Agent Unit Tests - run: | - just test-agent + # validate-codebase: + # needs: build-ux + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: Restore Cache docker image + # id: cache-docker-image + # uses: actions/cache/restore@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/build-image.tar + # key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} + # - + # name: Load Docker Image + # run: | + # docker load --input /tmp/build-image.tar + # - + # name: Download Web-UX Artifacts + # uses: actions/download-artifact@v3 + # with: + # name: web-ux + # path: ./web/dist + # - + # name: Restore Cache UX node_modules + # id: node_modules + # uses: actions/cache/restore@v3 + # env: + # cache-name: node-modules + # with: + # path: ./web/node_modules + # key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} + # - + # name: Validate the codebase + # # Docker run will only fail step if last command fails... so must do multiple commands as one. + # run: | + # just validate - build-agent: - needs: build-ux - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Restore Cache docker image - id: cache-docker-image - uses: actions/cache/restore@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/build-image.tar - key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} - - - name: Load Docker Image - run: | - docker load --input /tmp/build-image.tar - - - name: Download Web-UX SPA Artifacts - uses: actions/download-artifact@v3 - with: - name: web-ux - path: ./web/dist - - - name: Build agent - run: | - just build-agent - - - name: Make agents executable - run: | - sudo chmod -R +x ./bin/**/publishing-client - - - name: Agent build artifacts - uses: actions/upload-artifact@v3 - with: - name: agent-artifacts - path: bin/ + # test-ux: + # needs: build-ux + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: Restore Cache docker image + # id: cache-docker-image + # uses: actions/cache/restore@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/build-image.tar + # key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} + # - + # name: Load Docker Image + # run: | + # docker load --input /tmp/build-image.tar + # - + # name: Restore Cache UX node_modules + # id: node_modules + # uses: actions/cache/restore@v3 + # env: + # cache-name: node-modules + # with: + # path: ./web/node_modules + # key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} + # - + # name: Download Web-UX Artifacts + # uses: actions/download-artifact@v3 + # with: + # name: web-ux + # path: ./web/dist + # - + # name: UX Unit Tests + # run: | + # just web/test-unit + # - + # name: UX Go Race Tests + # run: | + # just web/test-race - ux-e2e-tests: - needs: build-agent - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Restore Cache docker image - id: cache-docker-image - uses: actions/cache/restore@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/build-image.tar - key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} - - - name: Load Docker Image - run: | - docker load --input /tmp/build-image.tar - - - name: Download built agents - uses: actions/download-artifact@v3 - with: - name: agent-artifacts - path: ./bin - - - name: Make agents executable - run: | - chmod -R +x ./bin/**/publishing-client - - - name: Restore Cache UX node_modules - id: node_modules - uses: actions/cache/restore@v3 - env: - cache-name: node-modules - with: - path: ./web/node_modules - key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} - - - name: UX E2E Tests - run: | - PATH="${PATH}:/usr/local/bin" just web/test-e2e + # agent-tests: + # needs: build-ux + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: Restore Cache docker image + # id: cache-docker-image + # uses: actions/cache/restore@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/build-image.tar + # key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} + # - + # name: Load Docker Image + # run: | + # docker load --input /tmp/build-image.tar + # - + # name: Download Web-UX SPA Artifacts + # uses: actions/download-artifact@v3 + # with: + # name: web-ux + # path: ./web/dist + # - + # name: Agent Unit Tests + # run: | + # just test-agent - test-windows: - needs: build-agent - runs-on: windows-latest - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - - - name: Download binary - uses: actions/download-artifact@v3 - with: - name: agent-artifacts - path: bin/ - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Make agents executable - run: | - chmod -R +x ./bin/**/publishing-client - - - name: Run Windows CLI Tests - env: - os: windows-latest - # bats reads the load libraries from relative path only in Windows - BATS_SUPPORT_LIB: ..\..\libs\bats-support\load.bash - BATS_ASSERT_LIB: ..\..\libs\bats-assert\load - # WARNING: Docker run will only fail step if last command fails... - run: | - just test/bats-install - $env:Path += ";$env:GITHUB_WORKSPACE\test\libs\bats-core\bin" - $env:BINARY_PATH = "$env:GITHUB_WORKSPACE\bin\windows-amd64\publishing-client" - cd $env:GITHUB_WORKSPACE\test - just run-client $env:os - - - name: Run Windows Cypress Tests - env: - os: windows-latest - DOCKER: "false" - run: | - just web/build-and-test-ci-e2e $env:os + # build-agent: + # needs: build-ux + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: Restore Cache docker image + # id: cache-docker-image + # uses: actions/cache/restore@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/build-image.tar + # key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} + # - + # name: Load Docker Image + # run: | + # docker load --input /tmp/build-image.tar + # - + # name: Download Web-UX SPA Artifacts + # uses: actions/download-artifact@v3 + # with: + # name: web-ux + # path: ./web/dist + # - + # name: Build agent + # run: | + # just build-agent + # - + # name: Make agents executable + # run: | + # sudo chmod -R +x ./bin/**/publishing-client + # - + # name: Agent build artifacts + # uses: actions/upload-artifact@v3 + # with: + # name: agent-artifacts + # path: bin/ + # ux-e2e-tests: + # needs: build-agent + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: Restore Cache docker image + # id: cache-docker-image + # uses: actions/cache/restore@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/build-image.tar + # key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} + # - + # name: Load Docker Image + # run: | + # docker load --input /tmp/build-image.tar + # - + # name: Download built agents + # uses: actions/download-artifact@v3 + # with: + # name: agent-artifacts + # path: ./bin + # - + # name: Make agents executable + # run: | + # chmod -R +x ./bin/**/publishing-client + # - + # name: Restore Cache UX node_modules + # id: node_modules + # uses: actions/cache/restore@v3 + # env: + # cache-name: node-modules + # with: + # path: ./web/node_modules + # key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} + # - + # name: UX E2E Tests + # run: | + # PATH="${PATH}:/usr/local/bin" just web/test-e2e - test-macos: - needs: build-agent - runs-on: macos-latest - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - - - name: Download binary - uses: actions/download-artifact@v3 - with: - name: agent-artifacts - path: bin/ - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Make agents executable - run: | - chmod -R +x ./bin/**/publishing-client - - - name: Run MacOs CLI Tests - env: - os: macos-latest - BATS_SUPPORT_LIB: ${{ github.workspace }}/test/libs/bats-support/load - BATS_ASSERT_LIB: ${{ github.workspace }}/test/libs/bats-assert/load - BINARY_PATH: ${{ github.workspace }}/bin/darwin-amd64/publishing-client - # WARNING Docker run will only fail step if last command fails... - run: | - just test/bats-install - PATH="$PATH:${{ github.workspace }}/test/libs/bats-core/bin" - cd ${{ github.workspace }}/test - just run-client ${os} - - - name: Run MacOS Cypress Tests - env: - os: macos-latest - DOCKER: "false" - run: | - just web/build-and-test-ci-e2e ${os} + # test-windows: + # needs: build-agent + # runs-on: windows-latest + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # - + # name: Download binary + # uses: actions/download-artifact@v3 + # with: + # name: agent-artifacts + # path: bin/ + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - + # name: Make agents executable + # run: | + # chmod -R +x ./bin/**/publishing-client + # - + # name: Run Windows CLI Tests + # env: + # os: windows-latest + # # bats reads the load libraries from relative path only in Windows + # BATS_SUPPORT_LIB: ..\..\libs\bats-support\load.bash + # BATS_ASSERT_LIB: ..\..\libs\bats-assert\load + # # WARNING: Docker run will only fail step if last command fails... + # run: | + # just test/bats-install + # $env:Path += ";$env:GITHUB_WORKSPACE\test\libs\bats-core\bin" + # $env:BINARY_PATH = "$env:GITHUB_WORKSPACE\bin\windows-amd64\publishing-client" + # cd $env:GITHUB_WORKSPACE\test + # just run-client $env:os + # - + # name: Run Windows Cypress Tests + # env: + # os: windows-latest + # DOCKER: "false" + # run: | + # just web/build-and-test-ci-e2e $env:os - build-linux-amd64: - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - needs: build-agent - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - path: bin/ - # these are required to run docker on amd64 and arm64 platforms - - - name: Setup qemu - uses: docker/setup-qemu-action@v2 - - - name: Setup buildx - uses: docker/setup-buildx-action@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Restore Cached linux-amd64 image - id: cache-linux-amd64-restore - uses: actions/cache/restore@v3 - with: - path: /tmp/linux-amd64-image.tar - key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} - env: - cache-name: cache-${{ github.ref }} - os: linux-amd64 - - - if: ${{ steps.cache-linux-amd64-restore.outputs.cache-hit != 'true' }} - name: Build and Export Docker Image - uses: docker/build-push-action@v3 - with: - context: . - build-args: | - BUILDKIT_INLINE_CACHE=1 - platform=linux-amd64 - pull: True - file: test/docker/Dockerfile - platforms: linux/amd64 - tags: rstudio/publishing-client-linux-amd64:latest - outputs: type=docker,dest=/tmp/linux-amd64-image.tar - - - if: ${{ steps.cache-linux-amd64-restore.outputs.cache-hit != 'true' }} - name: Cache docker image (update) - id: cache-linux-amd64-image-save - uses: actions/cache/save@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/linux-amd64-image.tar - key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} - test-linux-amd64: - needs: build-linux-amd64 - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Get binary - uses: actions/download-artifact@v3 - with: - name: agent-artifacts - path: bin/ - - - name: Make agents executable - run: | - chmod -R +x ./bin/**/publishing-client - - - name: Cache docker image (restore) - id: cache-linux-amd64-image - uses: actions/cache/restore@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/linux-amd64-image.tar - key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} - - - name: Load Docker Image - run: | - docker load --input /tmp/linux-amd64-image.tar - - - name: Run linux-amd64 CLI Tests - env: - os: linux-amd64 - run: | - just test/run-client ${os} - - - name: Run linux-amd64 Cypress Tests - env: - os: linux-amd64 - DOCKER: "false" - run: | - just test/ui-client ${os} + # test-macos: + # needs: build-agent + # runs-on: macos-latest + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # - + # name: Download binary + # uses: actions/download-artifact@v3 + # with: + # name: agent-artifacts + # path: bin/ + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - + # name: Make agents executable + # run: | + # chmod -R +x ./bin/**/publishing-client + # - + # name: Run MacOs CLI Tests + # env: + # os: macos-latest + # BATS_SUPPORT_LIB: ${{ github.workspace }}/test/libs/bats-support/load + # BATS_ASSERT_LIB: ${{ github.workspace }}/test/libs/bats-assert/load + # BINARY_PATH: ${{ github.workspace }}/bin/darwin-amd64/publishing-client + # # WARNING Docker run will only fail step if last command fails... + # run: | + # just test/bats-install + # PATH="$PATH:${{ github.workspace }}/test/libs/bats-core/bin" + # cd ${{ github.workspace }}/test + # just run-client ${os} + # - + # name: Run MacOS Cypress Tests + # env: + # os: macos-latest + # DOCKER: "false" + # run: | + # just web/build-and-test-ci-e2e ${os} - build-linux-arm64: - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - needs: build-agent - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - path: bin/ - # these are required to run docker on amd64 and arm64 platforms - - - name: Setup qemu - uses: docker/setup-qemu-action@v2 - - - name: Setup buildx - uses: docker/setup-buildx-action@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Restore Cached linux-arm64 image - id: cache-linux-arm64-restore - uses: actions/cache/restore@v3 - with: - path: /tmp/linux-arm64-image.tar - key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} - env: - cache-name: cache-${{ github.ref }} - os: linux-arm64 - - - if: ${{ steps.cache-linux-arm64-restore.outputs.cache-hit != 'true' }} - name: Build and Export Docker Image - uses: docker/build-push-action@v3 - with: - context: . - build-args: | - BUILDKIT_INLINE_CACHE=1 - platform=linux-arm64 - pull: True - file: test/docker/Dockerfile - platforms: linux/arm64 - tags: rstudio/publishing-client-linux-arm64:latest - outputs: type=docker,dest=/tmp/linux-arm64-image.tar - - - if: ${{ steps.cache-linux-arm64-restore.outputs.cache-hit != 'true' }} - name: Cache docker image (update) - id: cache-linux-arm64-image-save - uses: actions/cache/save@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/linux-arm64-image.tar - key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} + # build-linux-amd64: + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # needs: build-agent + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Download artifacts + # uses: actions/download-artifact@v3 + # with: + # path: bin/ + # # these are required to run docker on amd64 and arm64 platforms + # - + # name: Setup qemu + # uses: docker/setup-qemu-action@v2 + # - + # name: Setup buildx + # uses: docker/setup-buildx-action@v2 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - + # name: Restore Cached linux-amd64 image + # id: cache-linux-amd64-restore + # uses: actions/cache/restore@v3 + # with: + # path: /tmp/linux-amd64-image.tar + # key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} + # env: + # cache-name: cache-${{ github.ref }} + # os: linux-amd64 + # - + # if: ${{ steps.cache-linux-amd64-restore.outputs.cache-hit != 'true' }} + # name: Build and Export Docker Image + # uses: docker/build-push-action@v3 + # with: + # context: . + # build-args: | + # BUILDKIT_INLINE_CACHE=1 + # platform=linux-amd64 + # pull: True + # file: test/docker/Dockerfile + # platforms: linux/amd64 + # tags: rstudio/publishing-client-linux-amd64:latest + # outputs: type=docker,dest=/tmp/linux-amd64-image.tar + # - + # if: ${{ steps.cache-linux-amd64-restore.outputs.cache-hit != 'true' }} + # name: Cache docker image (update) + # id: cache-linux-amd64-image-save + # uses: actions/cache/save@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/linux-amd64-image.tar + # key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} - test-linux-arm64: - needs: build-linux-arm64 - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Get binary - uses: actions/download-artifact@v3 - with: - name: agent-artifacts - path: bin/ - - - name: Make agents executable - run: | - chmod -R +x ./bin/**/publishing-client + # test-linux-amd64: + # needs: build-linux-amd64 + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - + # name: Get binary + # uses: actions/download-artifact@v3 + # with: + # name: agent-artifacts + # path: bin/ + # - + # name: Make agents executable + # run: | + # chmod -R +x ./bin/**/publishing-client + # - + # name: Cache docker image (restore) + # id: cache-linux-amd64-image + # uses: actions/cache/restore@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/linux-amd64-image.tar + # key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} + # - + # name: Load Docker Image + # run: | + # docker load --input /tmp/linux-amd64-image.tar + # - + # name: Run linux-amd64 CLI Tests + # env: + # os: linux-amd64 + # run: | + # just test/run-client ${os} + # - + # name: Run linux-amd64 Cypress Tests + # env: + # os: linux-amd64 + # DOCKER: "false" + # run: | + # just test/ui-client ${os} + + # build-linux-arm64: + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # needs: build-agent + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Download artifacts + # uses: actions/download-artifact@v3 + # with: + # path: bin/ + # # these are required to run docker on amd64 and arm64 platforms + # - + # name: Setup qemu + # uses: docker/setup-qemu-action@v2 + # - + # name: Setup buildx + # uses: docker/setup-buildx-action@v2 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - + # name: Restore Cached linux-arm64 image + # id: cache-linux-arm64-restore + # uses: actions/cache/restore@v3 + # with: + # path: /tmp/linux-arm64-image.tar + # key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} + # env: + # cache-name: cache-${{ github.ref }} + # os: linux-arm64 + # - + # if: ${{ steps.cache-linux-arm64-restore.outputs.cache-hit != 'true' }} + # name: Build and Export Docker Image + # uses: docker/build-push-action@v3 + # with: + # context: . + # build-args: | + # BUILDKIT_INLINE_CACHE=1 + # platform=linux-arm64 + # pull: True + # file: test/docker/Dockerfile + # platforms: linux/arm64 + # tags: rstudio/publishing-client-linux-arm64:latest + # outputs: type=docker,dest=/tmp/linux-arm64-image.tar + # - + # if: ${{ steps.cache-linux-arm64-restore.outputs.cache-hit != 'true' }} + # name: Cache docker image (update) + # id: cache-linux-arm64-image-save + # uses: actions/cache/save@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/linux-arm64-image.tar + # key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} + + # test-linux-arm64: + # needs: build-linux-arm64 + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - + # name: Get binary + # uses: actions/download-artifact@v3 + # with: + # name: agent-artifacts + # path: bin/ + # - + # name: Make agents executable + # run: | + # chmod -R +x ./bin/**/publishing-client - # these are required to run docker on amd64 and arm64 platforms - - - name: Setup qemu - uses: docker/setup-qemu-action@v2 - - - name: Setup buildx - uses: docker/setup-buildx-action@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Cache docker image (restore) - id: cache-linux-arm64-image - uses: actions/cache/restore@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/linux-arm64-image.tar - key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} - - - name: Load Docker Image - run: | - docker load --input /tmp/linux-arm64-image.tar - - - name: Run linux-arm64 CLI Tests - env: - os: linux-arm64 - run: | - just test/run-client ${os} - # - - # name: Run linux-arm64 Cypress Tests - # env: - # os: linux-arm64 - # DOCKER: "false" - # run: | - # just web/build && \ - # just test/ui-client ${os} + # # these are required to run docker on amd64 and arm64 platforms + # - + # name: Setup qemu + # uses: docker/setup-qemu-action@v2 + # - + # name: Setup buildx + # uses: docker/setup-buildx-action@v2 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - + # name: Cache docker image (restore) + # id: cache-linux-arm64-image + # uses: actions/cache/restore@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/linux-arm64-image.tar + # key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} + # - + # name: Load Docker Image + # run: | + # docker load --input /tmp/linux-arm64-image.tar + # - + # name: Run linux-arm64 CLI Tests + # env: + # os: linux-arm64 + # run: | + # just test/run-client ${os} + # # - + # # name: Run linux-arm64 Cypress Tests + # # env: + # # os: linux-arm64 + # # DOCKER: "false" + # # run: | + # # just web/build && \ + # # just test/ui-client ${os} diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index c2a3da1fb6..abd37ee2bc 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -24,664 +24,679 @@ on: # - UX e2e tests jobs: - build-docker-image: + cache-keys: runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} + outputs: + dockerfile: ${{ steps.set-dockerfile.outputs['dockerfile'] }} + build-image.tar: ${{ steps.set-dockerfile.outputs['build-image.tar'] }} + package.json: ${{ steps.set-dockerfile.outputs['package.json'] }} steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Buildx - uses: docker/setup-buildx-action@v2 - - - name: Restore Cache docker image - id: cache-docker-image-restore - uses: actions/cache/restore@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/build-image.tar - key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('build/package/Dockerfile') }} - - - if: ${{ steps.cache-docker-image-restore.outputs.cache-hit != 'true' }} - name: Build and Export Docker Image - uses: docker/build-push-action@v3 - with: - context: . - build-args: BUILDKIT_INLINE_CACHE=1 - pull: True - file: build/package/Dockerfile - tags: rstudio/publishing-client:latest - outputs: type=docker,dest=/tmp/build-image.tar - - - if: ${{ steps.cache-docker-image-restore.outputs.cache-hit != 'true' }} - name: Cache docker image (update) - id: cache-docker-image-save - uses: actions/cache/save@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/build-image.tar - key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('build/package/Dockerfile') }} + - uses: actions/checkout@v3 + - name: set-dockerfile + run: echo "dockerfile=${{ hashFiles('build/package/Dockerfile') }}" >> $GITHUB_OUTPUT + - name: set-image + run: echo "build-image.tar=${{ hashFiles('/tmp/build-image.tar') }}" >> $GITHUB_OUTPUT + - name: set-package.json + run: echo "package.json=${{ hashFiles('./web/package.json') }}" >> $GITHUB_OUTPUT - build-ux: - needs: build-docker-image - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Cache docker image (restore) - id: cache-docker-image - uses: actions/cache/restore@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/build-image.tar - key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} - - - name: Load Docker Image - run: | - docker load --input /tmp/build-image.tar - - - name: Restore Cache UX node_modules - id: node_modules - uses: actions/cache/restore@v3 - env: - cache-name: node-modules - with: - path: ./web/node_modules - key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} - - - if: ${{ steps.node_modules.outputs.cache-hit != 'true' }} - name: Build up node_modules - run: | - just web/bootstrap - - - if: ${{ steps.node_modules.outputs.cache-hit != 'true' }} - name: Create the cache of UX node_modules (save) - id: create_node_modules - uses: actions/cache/save@v3 - env: - cache-name: node-modules - with: - path: ./web/node_modules - key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} - - - name: Build the UX - run: | - just build-web - - - name: Upload Web-UX Artifacts - uses: actions/upload-artifact@v3 - with: - name: web-ux - path: ./web/dist + # build-docker-image: + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Buildx + # uses: docker/setup-buildx-action@v2 + # - + # name: Restore Cache docker image + # id: cache-docker-image-restore + # uses: actions/cache/restore@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/build-image.tar + # key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('build/package/Dockerfile') }} + # - + # if: ${{ steps.cache-docker-image-restore.outputs.cache-hit != 'true' }} + # name: Build and Export Docker Image + # uses: docker/build-push-action@v3 + # with: + # context: . + # build-args: BUILDKIT_INLINE_CACHE=1 + # pull: True + # file: build/package/Dockerfile + # tags: rstudio/publishing-client:latest + # outputs: type=docker,dest=/tmp/build-image.tar + # - + # if: ${{ steps.cache-docker-image-restore.outputs.cache-hit != 'true' }} + # name: Cache docker image (update) + # id: cache-docker-image-save + # uses: actions/cache/save@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/build-image.tar + # key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('build/package/Dockerfile') }} - validate-codebase: - needs: build-ux - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Restore Cache docker image - id: cache-docker-image - uses: actions/cache/restore@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/build-image.tar - key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} - - - name: Load Docker Image - run: | - docker load --input /tmp/build-image.tar - - - name: Download Web-UX Artifacts - uses: actions/download-artifact@v3 - with: - name: web-ux - path: ./web/dist - - - name: Restore Cache UX node_modules - id: node_modules - uses: actions/cache/restore@v3 - env: - cache-name: node-modules - with: - path: ./web/node_modules - key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} - - - name: Validate the codebase - # Docker run will only fail step if last command fails... so must do multiple commands as one. - run: | - just validate + # build-ux: + # needs: build-docker-image + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: Cache docker image (restore) + # id: cache-docker-image + # uses: actions/cache/restore@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/build-image.tar + # key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} + # - + # name: Load Docker Image + # run: | + # docker load --input /tmp/build-image.tar + # - + # name: Restore Cache UX node_modules + # id: node_modules + # uses: actions/cache/restore@v3 + # env: + # cache-name: node-modules + # with: + # path: ./web/node_modules + # key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} + # - + # if: ${{ steps.node_modules.outputs.cache-hit != 'true' }} + # name: Build up node_modules + # run: | + # just web/bootstrap + # - + # if: ${{ steps.node_modules.outputs.cache-hit != 'true' }} + # name: Create the cache of UX node_modules (save) + # id: create_node_modules + # uses: actions/cache/save@v3 + # env: + # cache-name: node-modules + # with: + # path: ./web/node_modules + # key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} + # - + # name: Build the UX + # run: | + # just build-web + # - + # name: Upload Web-UX Artifacts + # uses: actions/upload-artifact@v3 + # with: + # name: web-ux + # path: ./web/dist - test-ux: - needs: build-ux - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Restore Cache docker image - id: cache-docker-image - uses: actions/cache/restore@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/build-image.tar - key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} - - - name: Load Docker Image - run: | - docker load --input /tmp/build-image.tar - - - name: Restore Cache UX node_modules - id: node_modules - uses: actions/cache/restore@v3 - env: - cache-name: node-modules - with: - path: ./web/node_modules - key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} - - - name: Download Web-UX Artifacts - uses: actions/download-artifact@v3 - with: - name: web-ux - path: ./web/dist - - - name: UX Unit Tests - run: | - just web/test-unit - - - name: UX Go Race Tests - run: | - just web/test-race + # validate-codebase: + # needs: build-ux + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: Restore Cache docker image + # id: cache-docker-image + # uses: actions/cache/restore@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/build-image.tar + # key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} + # - + # name: Load Docker Image + # run: | + # docker load --input /tmp/build-image.tar + # - + # name: Download Web-UX Artifacts + # uses: actions/download-artifact@v3 + # with: + # name: web-ux + # path: ./web/dist + # - + # name: Restore Cache UX node_modules + # id: node_modules + # uses: actions/cache/restore@v3 + # env: + # cache-name: node-modules + # with: + # path: ./web/node_modules + # key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} + # - + # name: Validate the codebase + # # Docker run will only fail step if last command fails... so must do multiple commands as one. + # run: | + # just validate - agent-tests: - needs: build-ux - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Restore Cache docker image - id: cache-docker-image - uses: actions/cache/restore@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/build-image.tar - key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} - - - name: Load Docker Image - run: | - docker load --input /tmp/build-image.tar - - - name: Download Web-UX SPA Artifacts - uses: actions/download-artifact@v3 - with: - name: web-ux - path: ./web/dist - - - name: Agent Unit Tests - run: | - just test-agent + # test-ux: + # needs: build-ux + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: Restore Cache docker image + # id: cache-docker-image + # uses: actions/cache/restore@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/build-image.tar + # key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} + # - + # name: Load Docker Image + # run: | + # docker load --input /tmp/build-image.tar + # - + # name: Restore Cache UX node_modules + # id: node_modules + # uses: actions/cache/restore@v3 + # env: + # cache-name: node-modules + # with: + # path: ./web/node_modules + # key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} + # - + # name: Download Web-UX Artifacts + # uses: actions/download-artifact@v3 + # with: + # name: web-ux + # path: ./web/dist + # - + # name: UX Unit Tests + # run: | + # just web/test-unit + # - + # name: UX Go Race Tests + # run: | + # just web/test-race - build-agent: - needs: build-ux - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Restore Cache docker image - id: cache-docker-image - uses: actions/cache/restore@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/build-image.tar - key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} - - - name: Load Docker Image - run: | - docker load --input /tmp/build-image.tar - - - name: Download Web-UX SPA Artifacts - uses: actions/download-artifact@v3 - with: - name: web-ux - path: ./web/dist - - - name: Build agent - run: | - just build-agent - - - name: Make agents executable - run: | - sudo chmod -R +x ./bin/**/publishing-client - - - name: Agent build artifacts - uses: actions/upload-artifact@v3 - with: - name: agent-artifacts - path: bin/ + # agent-tests: + # needs: build-ux + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: Restore Cache docker image + # id: cache-docker-image + # uses: actions/cache/restore@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/build-image.tar + # key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} + # - + # name: Load Docker Image + # run: | + # docker load --input /tmp/build-image.tar + # - + # name: Download Web-UX SPA Artifacts + # uses: actions/download-artifact@v3 + # with: + # name: web-ux + # path: ./web/dist + # - + # name: Agent Unit Tests + # run: | + # just test-agent - ux-e2e-tests: - needs: build-agent - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Restore Cache docker image - id: cache-docker-image - uses: actions/cache/restore@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/build-image.tar - key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} - - - name: Load Docker Image - run: | - docker load --input /tmp/build-image.tar - - - name: Download built agents - uses: actions/download-artifact@v3 - with: - name: agent-artifacts - path: ./bin - - - name: Make agents executable - run: | - chmod -R +x ./bin/**/publishing-client - - - name: Restore Cache UX node_modules - id: node_modules - uses: actions/cache/restore@v3 - env: - cache-name: node-modules - with: - path: ./web/node_modules - key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} - - - name: UX E2E Tests - run: | - PATH="${PATH}:/usr/local/bin" just web/test-e2e + # build-agent: + # needs: build-ux + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: Restore Cache docker image + # id: cache-docker-image + # uses: actions/cache/restore@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/build-image.tar + # key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} + # - + # name: Load Docker Image + # run: | + # docker load --input /tmp/build-image.tar + # - + # name: Download Web-UX SPA Artifacts + # uses: actions/download-artifact@v3 + # with: + # name: web-ux + # path: ./web/dist + # - + # name: Build agent + # run: | + # just build-agent + # - + # name: Make agents executable + # run: | + # sudo chmod -R +x ./bin/**/publishing-client + # - + # name: Agent build artifacts + # uses: actions/upload-artifact@v3 + # with: + # name: agent-artifacts + # path: bin/ - test-windows: - needs: build-agent - runs-on: windows-latest - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - - - name: Download binary - uses: actions/download-artifact@v3 - with: - name: agent-artifacts - path: bin/ - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Make agents executable - run: | - chmod -R +x ./bin/**/publishing-client - - - name: Run Windows CLI Tests - env: - os: windows-latest - # bats reads the load libraries from relative path only in Windows - BATS_SUPPORT_LIB: ..\..\libs\bats-support\load.bash - BATS_ASSERT_LIB: ..\..\libs\bats-assert\load - # WARNING: Docker run will only fail step if last command fails... - run: | - just test/bats-install - $env:Path += ";$env:GITHUB_WORKSPACE\test\libs\bats-core\bin" - $env:BINARY_PATH = "$env:GITHUB_WORKSPACE\bin\windows-amd64\publishing-client" - cd $env:GITHUB_WORKSPACE\test - just run-client $env:os - - - name: Run Windows Cypress Tests - env: - os: windows-latest - DOCKER: "false" - run: | - just web/build-and-test-ci-e2e $env:os + # ux-e2e-tests: + # needs: build-agent + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: Restore Cache docker image + # id: cache-docker-image + # uses: actions/cache/restore@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/build-image.tar + # key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }} + # - + # name: Load Docker Image + # run: | + # docker load --input /tmp/build-image.tar + # - + # name: Download built agents + # uses: actions/download-artifact@v3 + # with: + # name: agent-artifacts + # path: ./bin + # - + # name: Make agents executable + # run: | + # chmod -R +x ./bin/**/publishing-client + # - + # name: Restore Cache UX node_modules + # id: node_modules + # uses: actions/cache/restore@v3 + # env: + # cache-name: node-modules + # with: + # path: ./web/node_modules + # key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('./web/package.json') }} + # - + # name: UX E2E Tests + # run: | + # PATH="${PATH}:/usr/local/bin" just web/test-e2e + # test-windows: + # needs: build-agent + # runs-on: windows-latest + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # - + # name: Download binary + # uses: actions/download-artifact@v3 + # with: + # name: agent-artifacts + # path: bin/ + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - + # name: Make agents executable + # run: | + # chmod -R +x ./bin/**/publishing-client + # - + # name: Run Windows CLI Tests + # env: + # os: windows-latest + # # bats reads the load libraries from relative path only in Windows + # BATS_SUPPORT_LIB: ..\..\libs\bats-support\load.bash + # BATS_ASSERT_LIB: ..\..\libs\bats-assert\load + # # WARNING: Docker run will only fail step if last command fails... + # run: | + # just test/bats-install + # $env:Path += ";$env:GITHUB_WORKSPACE\test\libs\bats-core\bin" + # $env:BINARY_PATH = "$env:GITHUB_WORKSPACE\bin\windows-amd64\publishing-client" + # cd $env:GITHUB_WORKSPACE\test + # just run-client $env:os + # - + # name: Run Windows Cypress Tests + # env: + # os: windows-latest + # DOCKER: "false" + # run: | + # just web/build-and-test-ci-e2e $env:os - test-macos: - needs: build-agent - runs-on: macos-latest - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - - - name: Download binary - uses: actions/download-artifact@v3 - with: - name: agent-artifacts - path: bin/ - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Make agents executable - run: | - chmod -R +x ./bin/**/publishing-client - - - name: Run MacOs CLI Tests - env: - os: macos-latest - BATS_SUPPORT_LIB: ${{ github.workspace }}/test/libs/bats-support/load - BATS_ASSERT_LIB: ${{ github.workspace }}/test/libs/bats-assert/load - BINARY_PATH: ${{ github.workspace }}/bin/darwin-amd64/publishing-client - # WARNING Docker run will only fail step if last command fails... - run: | - just test/bats-install - PATH="$PATH:${{ github.workspace }}/test/libs/bats-core/bin" - cd ${{ github.workspace }}/test - just run-client ${os} - - - name: Run MacOS Cypress Tests - env: - os: macos-latest - DOCKER: "false" - run: | - just web/build-and-test-ci-e2e ${os} - build-linux-amd64: - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - needs: build-agent - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - path: bin/ - # these are required to run docker on amd64 and arm64 platforms - - - name: Setup qemu - uses: docker/setup-qemu-action@v2 - - - name: Setup buildx - uses: docker/setup-buildx-action@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Restore Cached linux-amd64 image - id: cache-linux-amd64-restore - uses: actions/cache/restore@v3 - with: - path: /tmp/linux-amd64-image.tar - key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} - env: - cache-name: cache-${{ github.ref }} - os: linux-amd64 - - - if: ${{ steps.cache-linux-amd64-restore.outputs.cache-hit != 'true' }} - name: Build and Export Docker Image - uses: docker/build-push-action@v3 - with: - context: . - build-args: | - BUILDKIT_INLINE_CACHE=1 - platform=linux-amd64 - pull: True - file: test/docker/Dockerfile - platforms: linux/amd64 - tags: rstudio/publishing-client-linux-amd64:latest - outputs: type=docker,dest=/tmp/linux-amd64-image.tar - - - if: ${{ steps.cache-linux-amd64-restore.outputs.cache-hit != 'true' }} - name: Cache docker image (update) - id: cache-linux-amd64-image-save - uses: actions/cache/save@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/linux-amd64-image.tar - key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} + # test-macos: + # needs: build-agent + # runs-on: macos-latest + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # - + # name: Download binary + # uses: actions/download-artifact@v3 + # with: + # name: agent-artifacts + # path: bin/ + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - + # name: Make agents executable + # run: | + # chmod -R +x ./bin/**/publishing-client + # - + # name: Run MacOs CLI Tests + # env: + # os: macos-latest + # BATS_SUPPORT_LIB: ${{ github.workspace }}/test/libs/bats-support/load + # BATS_ASSERT_LIB: ${{ github.workspace }}/test/libs/bats-assert/load + # BINARY_PATH: ${{ github.workspace }}/bin/darwin-amd64/publishing-client + # # WARNING Docker run will only fail step if last command fails... + # run: | + # just test/bats-install + # PATH="$PATH:${{ github.workspace }}/test/libs/bats-core/bin" + # cd ${{ github.workspace }}/test + # just run-client ${os} + # - + # name: Run MacOS Cypress Tests + # env: + # os: macos-latest + # DOCKER: "false" + # run: | + # just web/build-and-test-ci-e2e ${os} - test-linux-amd64: - needs: build-linux-amd64 - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Get binary - uses: actions/download-artifact@v3 - with: - name: agent-artifacts - path: bin/ - - - name: Make agents executable - run: | - chmod -R +x ./bin/**/publishing-client - - - name: Cache docker image (restore) - id: cache-linux-amd64-image - uses: actions/cache/restore@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/linux-amd64-image.tar - key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} - - - name: Load Docker Image - run: | - docker load --input /tmp/linux-amd64-image.tar - - - name: Run linux-amd64 CLI Tests - env: - os: linux-amd64 - run: | - just test/run-client ${os} - - - name: Run linux-amd64 Cypress Tests - env: - os: linux-amd64 - DOCKER: "false" - run: | - just test/ui-client ${os} + # build-linux-amd64: + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # needs: build-agent + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Download artifacts + # uses: actions/download-artifact@v3 + # with: + # path: bin/ + # # these are required to run docker on amd64 and arm64 platforms + # - + # name: Setup qemu + # uses: docker/setup-qemu-action@v2 + # - + # name: Setup buildx + # uses: docker/setup-buildx-action@v2 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - + # name: Restore Cached linux-amd64 image + # id: cache-linux-amd64-restore + # uses: actions/cache/restore@v3 + # with: + # path: /tmp/linux-amd64-image.tar + # key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} + # env: + # cache-name: cache-${{ github.ref }} + # os: linux-amd64 + # - + # if: ${{ steps.cache-linux-amd64-restore.outputs.cache-hit != 'true' }} + # name: Build and Export Docker Image + # uses: docker/build-push-action@v3 + # with: + # context: . + # build-args: | + # BUILDKIT_INLINE_CACHE=1 + # platform=linux-amd64 + # pull: True + # file: test/docker/Dockerfile + # platforms: linux/amd64 + # tags: rstudio/publishing-client-linux-amd64:latest + # outputs: type=docker,dest=/tmp/linux-amd64-image.tar + # - + # if: ${{ steps.cache-linux-amd64-restore.outputs.cache-hit != 'true' }} + # name: Cache docker image (update) + # id: cache-linux-amd64-image-save + # uses: actions/cache/save@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/linux-amd64-image.tar + # key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} - build-linux-arm64: - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - needs: build-agent - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - path: bin/ - # these are required to run docker on amd64 and arm64 platforms - - - name: Setup qemu - uses: docker/setup-qemu-action@v2 - - - name: Setup buildx - uses: docker/setup-buildx-action@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Restore Cached linux-arm64 image - id: cache-linux-arm64-restore - uses: actions/cache/restore@v3 - with: - path: /tmp/linux-arm64-image.tar - key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} - env: - cache-name: cache-${{ github.ref }} - os: linux-arm64 - - - if: ${{ steps.cache-linux-arm64-restore.outputs.cache-hit != 'true' }} - name: Build and Export Docker Image - uses: docker/build-push-action@v3 - with: - context: . - build-args: | - BUILDKIT_INLINE_CACHE=1 - platform=linux-arm64 - pull: True - file: test/docker/Dockerfile - platforms: linux/arm64 - tags: rstudio/publishing-client-linux-arm64:latest - outputs: type=docker,dest=/tmp/linux-arm64-image.tar - - - if: ${{ steps.cache-linux-arm64-restore.outputs.cache-hit != 'true' }} - name: Cache docker image (update) - id: cache-linux-arm64-image-save - uses: actions/cache/save@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/linux-arm64-image.tar - key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} + # test-linux-amd64: + # needs: build-linux-amd64 + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - + # name: Get binary + # uses: actions/download-artifact@v3 + # with: + # name: agent-artifacts + # path: bin/ + # - + # name: Make agents executable + # run: | + # chmod -R +x ./bin/**/publishing-client + # - + # name: Cache docker image (restore) + # id: cache-linux-amd64-image + # uses: actions/cache/restore@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/linux-amd64-image.tar + # key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} + # - + # name: Load Docker Image + # run: | + # docker load --input /tmp/linux-amd64-image.tar + # - + # name: Run linux-amd64 CLI Tests + # env: + # os: linux-amd64 + # run: | + # just test/run-client ${os} + # - + # name: Run linux-amd64 Cypress Tests + # env: + # os: linux-amd64 + # DOCKER: "false" + # run: | + # just test/ui-client ${os} - test-linux-arm64: - needs: build-linux-arm64 - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Get binary - uses: actions/download-artifact@v3 - with: - name: agent-artifacts - path: bin/ - - - name: Make agents executable - run: | - chmod -R +x ./bin/**/publishing-client + # build-linux-arm64: + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # needs: build-agent + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Download artifacts + # uses: actions/download-artifact@v3 + # with: + # path: bin/ + # # these are required to run docker on amd64 and arm64 platforms + # - + # name: Setup qemu + # uses: docker/setup-qemu-action@v2 + # - + # name: Setup buildx + # uses: docker/setup-buildx-action@v2 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - + # name: Restore Cached linux-arm64 image + # id: cache-linux-arm64-restore + # uses: actions/cache/restore@v3 + # with: + # path: /tmp/linux-arm64-image.tar + # key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} + # env: + # cache-name: cache-${{ github.ref }} + # os: linux-arm64 + # - + # if: ${{ steps.cache-linux-arm64-restore.outputs.cache-hit != 'true' }} + # name: Build and Export Docker Image + # uses: docker/build-push-action@v3 + # with: + # context: . + # build-args: | + # BUILDKIT_INLINE_CACHE=1 + # platform=linux-arm64 + # pull: True + # file: test/docker/Dockerfile + # platforms: linux/arm64 + # tags: rstudio/publishing-client-linux-arm64:latest + # outputs: type=docker,dest=/tmp/linux-arm64-image.tar + # - + # if: ${{ steps.cache-linux-arm64-restore.outputs.cache-hit != 'true' }} + # name: Cache docker image (update) + # id: cache-linux-arm64-image-save + # uses: actions/cache/save@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/linux-arm64-image.tar + # key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} + + # test-linux-arm64: + # needs: build-linux-arm64 + # runs-on: ubuntu-latest + # defaults: + # run: + # shell: bash -l {0} + # steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + # - + # name: Setup Just + # uses: extractions/setup-just@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - + # name: Get binary + # uses: actions/download-artifact@v3 + # with: + # name: agent-artifacts + # path: bin/ + # - + # name: Make agents executable + # run: | + # chmod -R +x ./bin/**/publishing-client - # these are required to run docker on amd64 and arm64 platforms - - - name: Setup qemu - uses: docker/setup-qemu-action@v2 - - - name: Setup buildx - uses: docker/setup-buildx-action@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Cache docker image (restore) - id: cache-linux-arm64-image - uses: actions/cache/restore@v3 - env: - cache-name: cache-${{ github.ref }} - with: - path: /tmp/linux-arm64-image.tar - key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} - - - name: Load Docker Image - run: | - docker load --input /tmp/linux-arm64-image.tar - - - name: Run linux-arm64 CLI Tests - env: - os: linux-arm64 - run: | - just test/run-client ${os} - # - - # name: Run linux-arm64 Cypress Tests - # env: - # os: linux-arm64 - # DOCKER: "false" - # run: | - # just web/build && \ - # just test/ui-client ${os} + # # these are required to run docker on amd64 and arm64 platforms + # - + # name: Setup qemu + # uses: docker/setup-qemu-action@v2 + # - + # name: Setup buildx + # uses: docker/setup-buildx-action@v2 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - + # name: Cache docker image (restore) + # id: cache-linux-arm64-image + # uses: actions/cache/restore@v3 + # env: + # cache-name: cache-${{ github.ref }} + # with: + # path: /tmp/linux-arm64-image.tar + # key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }} + # - + # name: Load Docker Image + # run: | + # docker load --input /tmp/linux-arm64-image.tar + # - + # name: Run linux-arm64 CLI Tests + # env: + # os: linux-arm64 + # run: | + # just test/run-client ${os} + # # - + # # name: Run linux-arm64 Cypress Tests + # # env: + # # os: linux-arm64 + # # DOCKER: "false" + # # run: | + # # just web/build && \ + # # just test/ui-client ${os}