Skip to content
Snippets Groups Projects
Unverified Commit d929799c authored by Guilherme Gazzo's avatar Guilherme Gazzo Committed by GitHub
Browse files

ci: cache artifacts to reduce api calls (#33567)

parent 9cf07972
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -49,6 +49,11 @@ jobs:
- uses: rharkor/caching-for-turbo@v1.5
- 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'
......
# .github/workflows/ci-preview.yml
name: Deploy PR previews
concurrency: preview-${{ github.ref }}
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: rharkor/caching-for-turbo@v1.5
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
......@@ -138,6 +138,11 @@ jobs:
- uses: rharkor/caching-for-turbo@v1.5
- 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
......
......@@ -47,6 +47,11 @@ jobs:
- uses: rharkor/caching-for-turbo@v1.5
- name: Restore turbo build
uses: actions/download-artifact@v4
with:
name: turbo-build
path: .turbo/cache
- name: Unit Test
run: yarn testunit
......
......@@ -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/caching-for-turbo@v1.5
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]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment