From e8be2dfc6cd067dea6f5407d14a887936a612e61 Mon Sep 17 00:00:00 2001 From: Nathan Booker Date: Mon, 28 Sep 2020 19:53:18 -0500 Subject: [PATCH 1/2] Refactor GitHub action for Bundle Test --- .github/workflows/pull_request_review.yml | 33 +++++++++++++++++------ 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pull_request_review.yml b/.github/workflows/pull_request_review.yml index 6dcf0485d0..40234ec3e0 100644 --- a/.github/workflows/pull_request_review.yml +++ b/.github/workflows/pull_request_review.yml @@ -1,13 +1,14 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# This workflow will do a clean install of your theme's dependencies and attempt to bundle the theme with Stencil CLI. +# If the theme fails to bundle, you can review the error logs to find out why. # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions -name: Node.js CI +name: Theme Bundling Test on: - push: - branches: [ master ] pull_request: - branches: [ master ] + branches: [ master, main ] + push: + branches: [ master, main ] jobs: build: @@ -16,12 +17,20 @@ jobs: strategy: matrix: - node: [10.x] + node: [12.x] steps: - name: Checkout code uses: actions/checkout@v2 + - name: Ruby Gem cache + uses: actions/cache@v2 + with: + path: vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gems- + - name: Setup Ruby 2.7 uses: ruby/setup-ruby@v1.40.0 with: @@ -33,14 +42,22 @@ jobs: with: node-version: ${{ matrix.node }} + - name: npm cache + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - name: Install Stencil CLI Dependency run: npm install -g @bigcommerce/stencil-cli - - name: Install Dependencies + - name: Install Theme Dependencies run: npm ci - name: Grunt Check run: npx grunt check - - name: Validate theme bundle + - name: Validate theme successfully bundles run: npx stencil bundle From 9d601c33945e7903d2f10a7df4399104dc25213b Mon Sep 17 00:00:00 2001 From: Nathan Booker Date: Mon, 28 Sep 2020 22:56:20 -0500 Subject: [PATCH 2/2] Go back to node 10 for now --- .github/workflows/pull_request_review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request_review.yml b/.github/workflows/pull_request_review.yml index 40234ec3e0..4f326af4f4 100644 --- a/.github/workflows/pull_request_review.yml +++ b/.github/workflows/pull_request_review.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: - node: [12.x] + node: [10.x] steps: - name: Checkout code