From 4bea0eb71a50c6fc72069d72732b9408575b610a Mon Sep 17 00:00:00 2001 From: Michael Brandt Date: Fri, 28 May 2021 00:45:45 -0600 Subject: [PATCH 01/12] cache dependencies --- .github/workflows/ruby.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 34a86ddb8e..994f31020a 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -17,8 +17,7 @@ jobs: uses: actions/setup-ruby@v1 with: ruby-version: 3.0.x + bundler-cache: true - name: Build and test with Rake run: | - gem install bundler - bundle install --jobs 4 --retry 3 bundle exec rake From 1160a1f38d9e0442ad3d9ca99592c64f33cadff2 Mon Sep 17 00:00:00 2001 From: Michael Brandt Date: Fri, 28 May 2021 00:47:45 -0600 Subject: [PATCH 02/12] fix which ruby step is used --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 994f31020a..70ae5541bf 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Set up Ruby 3.0 - uses: actions/setup-ruby@v1 + uses: ruby/setup-ruby@v1 with: ruby-version: 3.0.x bundler-cache: true From a6a04a03264ae20f01eedc90b94873f3f3649165 Mon Sep 17 00:00:00 2001 From: Michael Brandt Date: Fri, 28 May 2021 00:48:49 -0600 Subject: [PATCH 03/12] fix ruby version --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 70ae5541bf..e86304bd5b 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Ruby 3.0 uses: ruby/setup-ruby@v1 with: - ruby-version: 3.0.x + ruby-version: 3.0.1 bundler-cache: true - name: Build and test with Rake run: | From 0a3242088e28c794a6cc6657b9feb917e80d49da Mon Sep 17 00:00:00 2001 From: Michael Brandt Date: Fri, 28 May 2021 00:49:29 -0600 Subject: [PATCH 04/12] formatting --- .github/workflows/ruby.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index e86304bd5b..fe3fc4f8fb 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -8,9 +8,7 @@ on: jobs: build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v2 - name: Set up Ruby 3.0 From 7bd00ddfc41716d904379f5da3c73f648823c210 Mon Sep 17 00:00:00 2001 From: Michael Brandt Date: Fri, 28 May 2021 01:13:38 -0600 Subject: [PATCH 05/12] messing with CI --- .github/workflows/ruby.yml | 53 +++++++++++++++++++++++++++++++++++--- Rakefile | 6 +++++ 2 files changed, 55 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index fe3fc4f8fb..58e09dfd23 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -7,15 +7,60 @@ on: branches: [ master ] jobs: - build: + RuboCop: + name: Test runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set up Ruby 3.0 + - name: Set up Ruby 3.0 and install dependencies uses: ruby/setup-ruby@v1 with: ruby-version: 3.0.1 bundler-cache: true - - name: Build and test with Rake + - name: Compile run: | - bundle exec rake + bundle exec rake precompile:spec + - name: Cache Build + id: cache-build + uses: actions/cache@v2 + with: + path: build + key: ${{ runner.os }}-build + - name: Cache Public + id: cache-public + uses: actions/cache@v2 + with: + path: public + key: ${{ runner.os }}-public + - name: RuboCop + run: | + bundle exec rubocop + + Spec1: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby 3.0 and install dependencies + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.0.1 + bundler-cache: true + - name: Compile + run: | + bundle exec rake precompile:spec + - name: Cache Build + id: cache-build + uses: actions/cache@v2 + with: + path: build + key: ${{ runner.os }}-build + - name: Cache Public + id: cache-public + uses: actions/cache@v2 + with: + path: public + key: ${{ runner.os }}-public + - name: Test Thing + run: | + bundle exec rspec spec/assets_spec.rb diff --git a/Rakefile b/Rakefile index 9a5bba442b..32e41b72d1 100644 --- a/Rakefile +++ b/Rakefile @@ -109,6 +109,12 @@ task :precompile do assets.clean_intermediate_output_files end +task :'precompile:spec' do + require_relative 'lib/assets' + assets = Assets.new(compress: false, gzip: false, cache: true, precompiled: false) + assets.combine +end + desc 'Profile loading data' task 'stackprof', [:json] do |_task, args| require 'stackprof' From 9e1b0396d7e1756fdfaf752cc88cfc8201f68fbc Mon Sep 17 00:00:00 2001 From: Michael Brandt Date: Fri, 28 May 2021 01:14:40 -0600 Subject: [PATCH 06/12] fix name --- .github/workflows/ruby.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 58e09dfd23..9515cc4337 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -8,7 +8,6 @@ on: jobs: RuboCop: - name: Test runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From 6d97feb39a08118d17145c012d624f205ab8b7ab Mon Sep 17 00:00:00 2001 From: Michael Brandt Date: Fri, 28 May 2021 01:23:19 -0600 Subject: [PATCH 07/12] dependent jobs --- .github/workflows/ruby.yml | 44 +++++++------------------------------- 1 file changed, 8 insertions(+), 36 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 9515cc4337..969c05cd63 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -7,7 +7,8 @@ on: branches: [ master ] jobs: - RuboCop: + + setup: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -19,47 +20,18 @@ jobs: - name: Compile run: | bundle exec rake precompile:spec - - name: Cache Build - id: cache-build - uses: actions/cache@v2 - with: - path: build - key: ${{ runner.os }}-build - - name: Cache Public - id: cache-public - uses: actions/cache@v2 - with: - path: public - key: ${{ runner.os }}-public + + RuboCop: + needs: setup + runs-on: ubuntu-latest - name: RuboCop run: | bundle exec rubocop Spec1: - name: Test + needs: setup runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Ruby 3.0 and install dependencies - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.0.1 - bundler-cache: true - - name: Compile - run: | - bundle exec rake precompile:spec - - name: Cache Build - id: cache-build - uses: actions/cache@v2 - with: - path: build - key: ${{ runner.os }}-build - - name: Cache Public - id: cache-public - uses: actions/cache@v2 - with: - path: public - key: ${{ runner.os }}-public + name: Test - name: Test Thing run: | bundle exec rspec spec/assets_spec.rb From 577e2f264dca542c02cda817ff8156543404729c Mon Sep 17 00:00:00 2001 From: Michael Brandt Date: Fri, 28 May 2021 01:24:22 -0600 Subject: [PATCH 08/12] fix yaml --- .github/workflows/ruby.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 969c05cd63..66a559e015 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -24,6 +24,7 @@ jobs: RuboCop: needs: setup runs-on: ubuntu-latest + steps: - name: RuboCop run: | bundle exec rubocop @@ -32,6 +33,7 @@ jobs: needs: setup runs-on: ubuntu-latest name: Test + steps: - name: Test Thing run: | bundle exec rspec spec/assets_spec.rb From 29a67f66d6267a1b53f5ca75a6aa7832340a30e1 Mon Sep 17 00:00:00 2001 From: Michael Brandt Date: Fri, 28 May 2021 01:33:23 -0600 Subject: [PATCH 09/12] ci --- .github/workflows/ruby.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 66a559e015..a1a7da6e28 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -20,10 +20,23 @@ jobs: - name: Compile run: | bundle exec rake precompile:spec + - name: Cache + uses: actions/cache@v2 + with: + path: | + build + public + key: Cache-${{ github.sha }} RuboCop: needs: setup runs-on: ubuntu-latest + - uses: actions/checkout@v2 + - name: Set up Ruby 3.0 and install dependencies + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.0.1 + bundler-cache: true steps: - name: RuboCop run: | @@ -33,6 +46,12 @@ jobs: needs: setup runs-on: ubuntu-latest name: Test + - uses: actions/checkout@v2 + - name: Set up Ruby 3.0 and install dependencies + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.0.1 + bundler-cache: true steps: - name: Test Thing run: | From 362f70ac6674c5292e4ce402747def7ea64201b1 Mon Sep 17 00:00:00 2001 From: Michael Brandt Date: Fri, 28 May 2021 01:34:04 -0600 Subject: [PATCH 10/12] ci --- .github/workflows/ruby.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index a1a7da6e28..2df5d1428c 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -31,13 +31,13 @@ jobs: RuboCop: needs: setup runs-on: ubuntu-latest + steps: - uses: actions/checkout@v2 - name: Set up Ruby 3.0 and install dependencies uses: ruby/setup-ruby@v1 with: ruby-version: 3.0.1 bundler-cache: true - steps: - name: RuboCop run: | bundle exec rubocop @@ -52,7 +52,6 @@ jobs: with: ruby-version: 3.0.1 bundler-cache: true - steps: - name: Test Thing run: | bundle exec rspec spec/assets_spec.rb From e1b7b08711dfd1700ce80362704ddc6a57065a18 Mon Sep 17 00:00:00 2001 From: Michael Brandt Date: Fri, 28 May 2021 01:34:34 -0600 Subject: [PATCH 11/12] ci --- .github/workflows/ruby.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 2df5d1428c..e58c5d3e69 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -46,6 +46,7 @@ jobs: needs: setup runs-on: ubuntu-latest name: Test + steps: - uses: actions/checkout@v2 - name: Set up Ruby 3.0 and install dependencies uses: ruby/setup-ruby@v1 From e9f6853d9fb0d5dc0004d9feee857b4b0e3a7058 Mon Sep 17 00:00:00 2001 From: Michael Brandt Date: Fri, 28 May 2021 01:40:19 -0600 Subject: [PATCH 12/12] spec reads cache --- .github/workflows/ruby.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index e58c5d3e69..ed8dcaf69e 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -53,6 +53,13 @@ jobs: with: ruby-version: 3.0.1 bundler-cache: true + - name: Cache + uses: actions/cache@v2 + with: + path: | + build + public + key: Cache-${{ github.sha }} - name: Test Thing run: | bundle exec rspec spec/assets_spec.rb