deivid-rodriguez/byebug

View on GitHub
.github/workflows/ubuntu.yml

Summary

Maintainability
Test Coverage
---

name: ubuntu

on:
  pull_request:

  push:
    branches:
      - master

jobs:
  test:
    container: deividrodriguez/byebug:${{ matrix.version }}-${{ matrix.line_editor }}-${{ matrix.compiler }}

    runs-on: ubuntu-18.04

    strategy:
      fail-fast: false

      matrix:
        version: [2.5.8, 2.6.6, 2.7.2]
        line_editor: [libedit, readline]
        compiler: [clang, gcc]

    steps:
      - uses: actions/checkout@v2

      - name: Run CI checks
        run: |
          bin/setup.sh
          bin/rake

      - name: Save coverage
        run: mv coverage/.resultset.json coverage/${{ matrix.version }}-${{ matrix.line_editor }}-${{ matrix.compiler }}.json
        if: startsWith(matrix.version, '2.5')

      - uses: actions/upload-artifact@v1
        with:
          name: coverage-${{ matrix.version }}-${{ matrix.line_editor }}-${{ matrix.compiler }}
          path: coverage/${{ matrix.version }}-${{ matrix.line_editor }}-${{ matrix.compiler }}.json
        if: startsWith(matrix.version, '2.5')

    timeout-minutes: 15

  coverage:
    container: deividrodriguez/byebug:2.7.2-readline-gcc

    runs-on: ubuntu-18.04

    needs: test

    steps:
      - uses: actions/checkout@v2

      - uses: actions/download-artifact@v1
        with:
          name: coverage-2.5.8-libedit-clang
          path: coverage

      - uses: actions/download-artifact@v1
        with:
          name: coverage-2.5.8-libedit-gcc
          path: coverage

      - uses: actions/download-artifact@v1
        with:
          name: coverage-2.5.8-readline-clang
          path: coverage

      - uses: actions/download-artifact@v1
        with:
          name: coverage-2.5.8-readline-gcc
          path: coverage

      - name: Aggregate coverage results
        run: |
          bin/setup.sh
          bin/rake coverage:collate