From 6d34813702aac10f4ff76c043729393e1556d603 Mon Sep 17 00:00:00 2001 From: Quinn Dougherty Date: Wed, 23 Mar 2022 19:56:38 -0400 Subject: [PATCH] issue 67 --- .github/workflows/ci.yaml | 28 +++++++++++++++++++--------- package.json | 2 +- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 814380a8..856ed618 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -47,11 +47,20 @@ jobs: run: yarn test - name: Run tsc and webpack run: yarn bundle + - name: Cache lang build and bundle outputs + uses: actions/cache@v3 + id: lang-outputs + with: + path: | + lib + dist + node_modules + key: ${{ github.sha }} components-build-test: name: Components build and test runs-on: ubuntu-latest - needs: pre_check + needs: [pre_check, lang-build-test] if: ${{ needs.pre_check.outputs.should_skip_components != 'true' }} defaults: run: @@ -59,14 +68,15 @@ jobs: working-directory: packages/components steps: - uses: actions/checkout@v2 - - name: Install packages at monorepo-level and build squiggle-language - run: | - cd ../../ && - yarn && - cd packages/squiggle-lang && - yarn && - yarn build && - yarn bundle + - name: Gain lang build and bundle outputs from cache + uses: actions/cache@v3 + id: lang-outputs + with: + path: | + lib + dist + node_modules + key: ${{ github.sha }} - name: Install packages for components package run: yarn - name: See if storybook builds diff --git a/package.json b/package.json index 2b598e52..28f4fc76 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "ci:lang": "yarn workspace @quri/squiggle-lang ci", "ci:components": "yarn ci:lang && yarn workspace @quri/squiggle-components ci", "ci:playground": "yarn ci:components && yarn workspace @quri/squiggle-playground ci", - "nodeclean": "rm -r node_modules && rm -r packages/*/node_modules && " + "nodeclean": "rm -r node_modules && rm -r packages/*/node_modules" }, "workspaces": [ "packages/*"