Skip to content

Commit

Permalink
Improvements to CI pipeline (OSC#745)
Browse files Browse the repository at this point in the history
Make CI jobs parallel with some other tweaks and updates.
  • Loading branch information
msquee authored Dec 23, 2020
1 parent cfa4227 commit 75062f0
Showing 1 changed file with 25 additions and 12 deletions.
37 changes: 25 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,56 @@ name: Tests

on:
push:
branches:
- master
branches: [master]
pull_request:

jobs:
unit-tests:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
ruby: ["2.5.5"]
bundler: ["1.17.3"]
runs-on: ${{ matrix.os }}
name: Unit tests
runs-on: ubuntu-latest

steps:
- name: Checkout
- name: Checkout ${{ github.sha }}
uses: actions/checkout@v2
- name: Setup Ruby
uses: actions/setup-ruby@v1

- name: Setup Ruby ${{ matrix.ruby }} using Bundler ${{ matrix.bundler }}
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.5'
ruby-version: ${{ matrix.ruby }}
bundler: ${{ matrix.bundler }}

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('apps/*/Gemfile.lock') }}

- name: Setup Bundler
run: |
gem install bundler -v 1.17.3
bundle config path ~/vendor/bundle
- name: Run ShellCheck
run: rake test:shellcheck

- name: Run unit tests
run: rake test:unit

e2e-tests:
strategy:
matrix:
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
name: End-to-end tests
runs-on: ubuntu-latest
needs: unit-tests

steps:
- name: Checkout
- name: Checkout ${{ github.sha }}
uses: actions/checkout@v2

- name: Run E2E tests
run: rake test:e2e

0 comments on commit 75062f0

Please sign in to comment.