Skip to content

Commit

Permalink
ci: cache artifacts to reduce api calls (#33567)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo authored Oct 14, 2024
1 parent 9cf0797 commit d929799
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 42 deletions.
6 changes: 6 additions & 0 deletions .github/actions/build-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ runs:
install: true
NPM_TOKEN: ${{ inputs.NPM_TOKEN }}

- name: Restore turbo build
uses: actions/download-artifact@v4
with:
name: turbo-build
path: .turbo/cache

- run: yarn build
if: inputs.setup == 'true'
shell: bash
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci-code-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ jobs:

- uses: rharkor/[email protected]

- name: Restore turbo build
uses: actions/download-artifact@v4
with:
name: turbo-build
path: .turbo/cache
- name: Cache TypeCheck
uses: actions/cache@v3
if: matrix.check == 'ts'
Expand Down
42 changes: 0 additions & 42 deletions .github/workflows/ci-deploy-gh-pages-preview.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .github/workflows/ci-test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ jobs:

- uses: rharkor/[email protected]

- name: Restore turbo build
uses: actions/download-artifact@v4
with:
name: turbo-build
path: .turbo/cache
- run: yarn build
# if we are testing a PR from a fork, we need to build the docker image at this point
- uses: ./.github/actions/build-docker
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci-test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ jobs:

- uses: rharkor/[email protected]

- name: Restore turbo build
uses: actions/download-artifact@v4
with:
name: turbo-build
path: .turbo/cache
- name: Unit Test
run: yarn testunit

Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,46 @@ jobs:
- name: Build Rocket.Chat Packages
run: yarn build

- name: Store turbo build
uses: actions/upload-artifact@v4
with:
name: turbo-build
path: .turbo/cache
overwrite: true
include-hidden-files: true

deploy-preview:
runs-on: ubuntu-latest
needs: [release-versions, packages-build]
steps:
- uses: actions/checkout@v3

- uses: rharkor/[email protected]
if: github.event.action != 'closed'

- name: Setup NodeJS
uses: ./.github/actions/setup-node
if: github.event.action != 'closed'
with:
node-version: 14.21.3
deno-version: 1.37.1
cache-modules: true
install: true

- name: Build
if: github.event.action != 'closed'
run: |
yarn turbo run build-preview
yarn turbo run .:build-preview-move
npx indexifier .preview --html --extensions .html > .preview/index.html
- uses: rossjrw/pr-preview-action@v1
with:
source-dir: .preview
preview-branch: gh-pages
umbrella-dir: pr-preview
action: auto

build:
name: 📦 Meteor Build - coverage
needs: [release-versions, packages-build]
Expand Down

0 comments on commit d929799

Please sign in to comment.