From 75062f0c392123de44e160826eec8f929f1b6984 Mon Sep 17 00:00:00 2001 From: Mario Squeo <6081892+msquee@users.noreply.github.com> Date: Wed, 23 Dec 2020 11:11:28 -0500 Subject: [PATCH] Improvements to CI pipeline (#745) Make CI jobs parallel with some other tweaks and updates. --- .github/workflows/tests.yml | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4c8545034c..66693e0e2b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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