From 391de6d16b5fcaba309501a92675bbedb207b8fd Mon Sep 17 00:00:00 2001 From: Yusuke Doi Date: Mon, 13 Jul 2020 00:14:36 +0900 Subject: [PATCH 1/9] =?UTF-8?q?workflow=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3214ca7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: CI + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + container: + image: circleci/ruby:2.7.1-node-browsers + env: + RAILS_ENV: test + PGHOST: 127.0.0.1 + PGUSER: postgres + + services: + postgres: + image: postgres:9.4 + + steps: + - uses: actions/checkout@v2 + + - name: Cache bundler + uses: actions/cache@v2 + with: + path: vendor/bundle + key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gem- + + - name: Bundle install + run: bundle install --jobs=4 --retry=3 --path vendor/bundle + + - name: Database setup + run: | + bin/rails db:create + bin/rails db:schema:load + + - name: Run RuboCop + run : bundle exec rubocop + + - name: Run test + run: | + bundle exec rspec --format progress --format RspecJunitFormatter From c2ae71fd40fb6ff5f6816e6d4deaab5300ecc4f2 Mon Sep 17 00:00:00 2001 From: Yusuke Doi Date: Mon, 13 Jul 2020 00:36:16 +0900 Subject: [PATCH 2/9] =?UTF-8?q?=E3=83=91=E3=83=BC=E3=83=9F=E3=83=83?= =?UTF-8?q?=E3=82=B7=E3=83=A7=E3=83=B3=E3=81=AE=E5=A4=89=E6=9B=B4=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3214ca7..c8eddcc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,9 @@ jobs: image: postgres:9.4 steps: + - name: Setup file system permissions + run: sudo chmod -R 777 $GITHUB_WORKSPACE /github /__w/_temp + - uses: actions/checkout@v2 - name: Cache bundler From 40389ec45625dc76eca62cfc0688d438d599daab Mon Sep 17 00:00:00 2001 From: Yusuke Doi Date: Mon, 13 Jul 2020 00:45:48 +0900 Subject: [PATCH 3/9] =?UTF-8?q?=E3=83=87=E3=83=BC=E3=82=BF=E3=83=99?= =?UTF-8?q?=E3=83=BC=E3=82=B9=E3=81=AE=E3=83=9D=E3=83=BC=E3=83=88=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8eddcc..d4f53ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,8 @@ jobs: services: postgres: image: postgres:9.4 + ports: + - 5432:5432 steps: - name: Setup file system permissions From b24c99d2ebb51c975cf8fa2a46c448d39612b64d Mon Sep 17 00:00:00 2001 From: Yusuke Doi Date: Mon, 13 Jul 2020 00:58:45 +0900 Subject: [PATCH 4/9] =?UTF-8?q?PGHOST=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4f53ca..12afaee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,6 @@ jobs: image: circleci/ruby:2.7.1-node-browsers env: RAILS_ENV: test - PGHOST: 127.0.0.1 PGUSER: postgres services: From e61542a9c8f2dadb3f74bf4e8c9cb981861135b6 Mon Sep 17 00:00:00 2001 From: Yusuke Doi Date: Mon, 20 Jul 2020 22:26:27 +0900 Subject: [PATCH 5/9] =?UTF-8?q?=E3=83=9D=E3=83=BC=E3=83=88=E3=81=AE?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 12afaee..7c1214b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,8 +15,6 @@ jobs: services: postgres: image: postgres:9.4 - ports: - - 5432:5432 steps: - name: Setup file system permissions From c6a43d4aeb0617dbc074eb9f0b3f00086c92d763 Mon Sep 17 00:00:00 2001 From: Yusuke Doi Date: Mon, 20 Jul 2020 22:28:08 +0900 Subject: [PATCH 6/9] =?UTF-8?q?PGHOST=E3=82=92=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c1214b..0a181a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,7 @@ jobs: image: circleci/ruby:2.7.1-node-browsers env: RAILS_ENV: test + PGHOST: postgres PGUSER: postgres services: From de04917a0279626a10b3fb66298a0a6bf8150191 Mon Sep 17 00:00:00 2001 From: Yusuke Doi Date: Mon, 20 Jul 2020 22:58:35 +0900 Subject: [PATCH 7/9] =?UTF-8?q?POSTGRES=5FUSER=E3=82=92=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a181a9..c1264fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,11 +11,13 @@ jobs: env: RAILS_ENV: test PGHOST: postgres - PGUSER: postgres + PGUSER: test services: postgres: image: postgres:9.4 + env: + POSTGRES_USER: test steps: - name: Setup file system permissions From 53c9eb4ebc9f33558ebca7a4429314942ad60a82 Mon Sep 17 00:00:00 2001 From: Yusuke Doi Date: Tue, 21 Jul 2020 23:51:45 +0900 Subject: [PATCH 8/9] =?UTF-8?q?RAILS=5FENV=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1264fc..e2e8e86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,6 @@ jobs: container: image: circleci/ruby:2.7.1-node-browsers env: - RAILS_ENV: test PGHOST: postgres PGUSER: test From e458a055a9b9cd1f03263e1276b5872677c98cdc Mon Sep 17 00:00:00 2001 From: Yusuke Doi Date: Wed, 22 Jul 2020 00:05:27 +0900 Subject: [PATCH 9/9] =?UTF-8?q?circleci=E3=81=AEimage=E3=82=92=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=97?= =?UTF-8?q?=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2e8e86..f36b511 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: services: postgres: - image: postgres:9.4 + image: circleci/postgres:9.4 env: POSTGRES_USER: test