name: C/C++ CI

on:
  push:
    branches: [ master, release/v8.* ]
  pull_request:
    branches: [ master, release/v8.* ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - uses: ammaraskar/gcc-problem-matcher@master
    - name: Install prerequisites
      run: scripts/install-prerequisites.sh
    - name: Run tests
      run: python tests/main.py report
    - name: Upload coverage to Codecov
      uses: codecov/codecov-action@v1
      if: github.event_name == 'push'
      with:
        fail_ci_if_error: true
        verbose: true

