From f898e6cc364aa4062ef72d5ed67692c8528c560d Mon Sep 17 00:00:00 2001 From: Joao Vieira Date: Thu, 29 Oct 2020 16:49:17 -0300 Subject: [PATCH] Config Github Actions for Rspec --- .github/workflows/unit_test.yml | 39 +++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/unit_test.yml diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml new file mode 100644 index 00000000..56e2b7fb --- /dev/null +++ b/.github/workflows/unit_test.yml @@ -0,0 +1,39 @@ +name: Ruby Unit Tests + +on: + push: + branches: + - master + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + ruby: [ '2.5', '2.6', '2.7' ] + + name: Ruby ${{ matrix.ruby }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + - name: Cache gems + uses: actions/cache@v2 + env: + cache-name: cache-gems + with: + path: vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gems- + - name: Set bundle config path + run: | + bundle config path vendor/bundle + - name: Install dependencies + run: | + bundle install + - name: Ruby Unit tests + run: | + bundle exec rspec