Skip to content

Commit

Permalink
switch to gha cache
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysVuika committed Jan 3, 2024
1 parent 43f16a0 commit 1ce47e2
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 15 deletions.
16 changes: 8 additions & 8 deletions .github/actions/before-e2e/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ runs:
shell: bash
run: ./node_modules/@alfresco/adf-cli/bin/adf-cli check-cs-env --host $BASE_URL -u $ADMIN_EMAIL -p $ADMIN_PASSWORD || exit 1

- name: Download artifacts
uses: ./.github/actions/download-job-artifact
with:
artifact: ${{ inputs.from }}
output: ${{ inputs.to }}
aws-access-key-id: ${{ inputs.aws-access-key-id }}
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
aws-region: ${{ inputs.aws-region }}
# - name: Download artifacts
# uses: ./.github/actions/download-job-artifact
# with:
# artifact: ${{ inputs.from }}
# output: ${{ inputs.to }}
# aws-access-key-id: ${{ inputs.aws-access-key-id }}
# aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
# aws-region: ${{ inputs.aws-region }}

- name: Install google chrome
shell: bash
Expand Down
38 changes: 31 additions & 7 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,23 @@ jobs:
- uses: ./.github/actions/before-install
- run: npm ci
- run: npm run build -- $BUILD_OPTS
- name: upload job artifact

- name: dist cache
if: ${{ success() }}
uses: ./.github/actions/upload-job-artifact
uses: actions/cache@v3
with:
artifact: $CONTENT_CE_DIST_PATH
output: $S3_DBP_FOLDER/alfresco-content-app.tar.bz2
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
path: $CONTENT_CE_DIST_PATH
key: cache-dist-${{ github.run_id }}-${{ github.run_attempt }}

# - name: upload job artifact
# if: ${{ success() }}
# uses: ./.github/actions/upload-job-artifact
# with:
# artifact: $CONTENT_CE_DIST_PATH
# output: $S3_DBP_FOLDER/alfresco-content-app.tar.bz2
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: ${{ env.AWS_REGION }}

unit-tests:
needs: [lint, build]
Expand Down Expand Up @@ -136,6 +144,13 @@ jobs:
cache: 'npm'
- uses: ./.github/actions/before-install
- run: npm ci

- uses: actions/cache/restore@v3
id: cache
with:
path: $CONTENT_CE_DIST_PATH
key: cache-dist-${{ github.run_id }}-${{ github.run_attempt }}

- uses: ./.github/actions/before-e2e
with:
from: "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2"
Expand Down Expand Up @@ -189,8 +204,16 @@ jobs:
with:
node-version-file: '.nvmrc'
cache: 'npm'

- uses: ./.github/actions/before-install
- run: npm ci

- uses: actions/cache/restore@v3
id: cache
with:
path: $CONTENT_CE_DIST_PATH
key: cache-dist-${{ github.run_id }}-${{ github.run_attempt }}

- uses: ./.github/actions/before-e2e
with:
from: "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2"
Expand All @@ -199,6 +222,7 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}

- name: before playwright
shell: bash
run: npx playwright install chromium
Expand Down

0 comments on commit 1ce47e2

Please sign in to comment.