• jrfnl's avatar
    CI: switch to GitHub Actions - step 3: test and coverage stage · 7d9e8dae
    jrfnl authored
    This commit:
    * Adds a GH Actions workflow for the CI checks which were previously run on Travis in the `test` and `coverage` stages.
    * Removes the, now redundant, `.travis.yml` configuration.
    * Updates the `.gitattributes` file.
    * Updates the "Build Status" badge in the Readme to use the results from the GH `Test` Actions runs.
    
    Notes:
    1. After a lot of experimenting, I've split this into three (four) jobs.
        - Linting against high/low PHP versions of each major first.
            This removes the linting against interim version of PHP majors, as, to be fair, that shouldn't really be make much difference anyhow.
        - Running the tests without code coverage.
        - Running the tests with code coverage.
        - And a final job to let Coveralls know that all parallel run coverage jobs have finished.
    2. Each of these jobs has a `needs` dependency on the previous job to prevent it from starting if the previous job failed.
        While not 100% necessary, this is just an efficiency tweak, being kind to the free service being offered as we know that if linting fails, the tests will fail etc.
    3. The builds in the `test` and `coverage` jobs are essentially the same as previously run on Travis, though PHP 8.0 is now fully accounted for and `8.1` is set as `nightly`.
    4. Previously, this "stage" would run on all `pull requests` events.
        The current set-up still does so, with one addition: pushes to `master` (merges) will now also use this workflow instead of the quicktest.
        This replaces the full run on tagging a release, meaning that thing will essentially be the same.
    5. As there are a couple of jobs which are "allowed to fail" (`experimental` = true), the build status will unfortunately show as "failed", even though all non-experimental jobs have succeeded.
         This is a known issue in GHA: https://github.com/actions/toolkit/issues/399
    7d9e8dae