From d3836723a68d53b19a8012877eb79d21957007d0 Mon Sep 17 00:00:00 2001 From: Jeremy Prevost Date: Fri, 15 Nov 2019 10:13:59 -0500 Subject: [PATCH 01/10] Adds GitHub action to run tests --- .github/workflows/test.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..501d958a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,20 @@ +name: Test + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Set up Ruby 2.6 + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + - name: Build and test with Rake + run: | + gem install bundler + bundle install --jobs 4 --retry 3 + bundle exec rails test From 69e5a79a39338b84a8f7a574b1bd2a6f24cc06b5 Mon Sep 17 00:00:00 2001 From: Jeremy Prevost Date: Fri, 15 Nov 2019 10:16:14 -0500 Subject: [PATCH 02/10] use full ruby version --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 501d958a..b79340bd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: - name: Set up Ruby 2.6 uses: actions/setup-ruby@v1 with: - ruby-version: 2.6.x + ruby-version: 2.6.5 - name: Build and test with Rake run: | gem install bundler From f158b956b3627cc24a195e917d8d8f0fa28465c6 Mon Sep 17 00:00:00 2001 From: Jeremy Prevost Date: Fri, 15 Nov 2019 10:45:50 -0500 Subject: [PATCH 03/10] use a ruby container the ruby version in the default builds seems perpetually problematic based on the issue history --- .github/workflows/test.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b79340bd..6525e557 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,12 +9,10 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Set up Ruby 2.6 - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.5 - name: Build and test with Rake run: | gem install bundler bundle install --jobs 4 --retry 3 bundle exec rails test + container: + image: ruby:2.6.5-slim From cf0b2076a27f53ae70a4fd32aac4a966b1800ffa Mon Sep 17 00:00:00 2001 From: Jeremy Prevost Date: Fri, 15 Nov 2019 10:50:34 -0500 Subject: [PATCH 04/10] :shrug: --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6525e557..94ab79f3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,5 +14,5 @@ jobs: gem install bundler bundle install --jobs 4 --retry 3 bundle exec rails test - container: - image: ruby:2.6.5-slim + container: + image: ruby:2.6.5-slim From ad510cbaf778d173bf5365922fbd2764d1c5a81d Mon Sep 17 00:00:00 2001 From: Jeremy Prevost Date: Fri, 15 Nov 2019 11:02:44 -0500 Subject: [PATCH 05/10] no slim for you! --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 94ab79f3..19ded459 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,4 +15,4 @@ jobs: bundle install --jobs 4 --retry 3 bundle exec rails test container: - image: ruby:2.6.5-slim + image: ruby:2.6.5 From 544b868b97ffd87f061f8f64b01e138423307a61 Mon Sep 17 00:00:00 2001 From: Jeremy Prevost Date: Fri, 15 Nov 2019 11:17:15 -0500 Subject: [PATCH 06/10] :cry: --- .github/workflows/test.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 19ded459..446d5be4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,15 +4,12 @@ on: [push] jobs: build: - - runs-on: ubuntu-latest - + runs: + using: 'docker' + image: 'Dockerfile' steps: - uses: actions/checkout@v1 - name: Build and test with Rake run: | - gem install bundler - bundle install --jobs 4 --retry 3 bundle exec rails test - container: - image: ruby:2.6.5 + From cc2465f4436f974e98698406efb9f60716596087 Mon Sep 17 00:00:00 2001 From: Jeremy Prevost Date: Fri, 15 Nov 2019 11:25:32 -0500 Subject: [PATCH 07/10] :see_no_evil: --- .github/workflows/test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 446d5be4..9057cdf9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,11 +2,12 @@ name: Test on: [push] +runs: + using: 'docker' + image: 'Dockerfile' + jobs: build: - runs: - using: 'docker' - image: 'Dockerfile' steps: - uses: actions/checkout@v1 - name: Build and test with Rake From 647104f1160033eed9a0029b619877dc97111af0 Mon Sep 17 00:00:00 2001 From: Jeremy Prevost Date: Fri, 15 Nov 2019 11:30:27 -0500 Subject: [PATCH 08/10] sigh https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-a-docker-container-action#create-a-dockerfile --- .github/workflows/build.yml | 5 +++++ .github/workflows/test.yml | 10 ++++------ 2 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..61d50a26 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,5 @@ +name: 'build image' +description: 'builds image for tests' +runs: + using: 'docker' + image: 'Dockerfile' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9057cdf9..413d9a30 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,15 +2,13 @@ name: Test on: [push] -runs: - using: 'docker' - image: 'Dockerfile' - jobs: build: + + runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v1 - name: Build and test with Rake + - uses: actions/build@v1 run: | bundle exec rails test - From df8a9182c399ed9d9cc13b09a886d14aabc9bb57 Mon Sep 17 00:00:00 2001 From: Jeremy Prevost Date: Fri, 15 Nov 2019 11:50:43 -0500 Subject: [PATCH 09/10] yawn --- .github/workflows/build.yml | 5 ----- .github/workflows/test.yml | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 6 deletions(-) delete mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 61d50a26..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,5 +0,0 @@ -name: 'build image' -description: 'builds image for tests' -runs: - using: 'docker' - image: 'Dockerfile' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 413d9a30..21f858b4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,21 @@ jobs: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v1 + - uses: actions/cache@preview + id: cache + with: + path: ~/local/rubies + key: ruby-2.6.5 + - uses: clupprich/ruby-build-action@master + id: ruby + with: + ruby-version: 2.6.5 + cache-available: ${{ steps.cache.outputs.cache-hit == 'true' }} + - name: Print version + run: ${{ steps.ruby.outputs.ruby-path }} --version - name: Build and test with Rake - - uses: actions/build@v1 run: | + gem install bundler + bundle install --jobs 4 --retry 3 bundle exec rails test From 7ee38281eaaf97cc6a4f9de9fdd2913750c66f3c Mon Sep 17 00:00:00 2001 From: Jeremy Prevost Date: Fri, 15 Nov 2019 11:57:49 -0500 Subject: [PATCH 10/10] moah --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 21f858b4..591895b2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,5 +24,5 @@ jobs: - name: Build and test with Rake run: | gem install bundler - bundle install --jobs 4 --retry 3 + bundle install --jobs 4 --retry 3 --without production bundle exec rails test