Skip to content

Commit

Permalink
add GitHub Actions config file
Browse files Browse the repository at this point in the history
  • Loading branch information
koi-chan committed Jan 3, 2021
1 parent 8029e44 commit 09307df
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test

on:
push:
paths-ignore:
- doc/**
- README.md
pull_request: {}

jobs:
test:
name: Test RGRB
strategy:
fail-fast: false
matrix:
ruby:
- 2.5
- 2.6
- 2.7
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
env:
RAILS_ENV: test
TZ: Asia/Tokyo
CC_TEST_REPORTER_ID: 74e589ede57e23f089cbbd2eee75be23a93b5ace7b5cfce58213cd3f21447147
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}

# runs 'bundle install' and caches installed gems automatically
bundler-cache: true
- name: Setup Code Climate Test Reporter
run: |
wget https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 -O ./cc-test-reporter
chmod +x ./cc-test-reporter
- name: Run tests and report the result to Code Climate
run: |
GIT_BRANCH=$GITHUB_REF GIT_COMMIT_SHA=$GITHUB_SHA ./cc-test-reporter before-build
bin/rails test
GIT_BRANCH=$GITHUB_REF GIT_COMMIT_SHA=$GITHUB_SHA ./cc-test-reporter after-build -t simplecov --exit-code $?

0 comments on commit 09307df

Please sign in to comment.