Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

travis does not advance to next build stage when fast_finish: true #9677

Closed
maxheld83 opened this issue May 29, 2018 · 9 comments
Closed

travis does not advance to next build stage when fast_finish: true #9677

maxheld83 opened this issue May 29, 2018 · 9 comments

Comments

@maxheld83
Copy link

As per this discussion I understand that fast_finish: true is supported for build stages with matrix expansion and allow_failures: .

However, I observed that a later (deploy) stage did not start, before all earlier (test) jobs where finished, even though the missing one(s) were all allowed failures.

no-fast

Here's the build.

Here's the .travis.yml (please don't laugh at my clumsy R scripts).

# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r

language: r

# matrix ====
r:
  - oldrel
  - release
  - devel
os:
  - linux
  - osx

# general settings ====

warnings_are_errors: true

cache:
  packages: yes
  directories:
    - $HOME/bin

git:
  # accio submodule is used only for deploy, so skip generally
  submodules: false
  depth: 3

# these need not be in pensieve DESCRIPTION, but are still needed for deploy
# when mentioned here, they get cached
r_packages:
  - covr
  - pkgdown
  - rsconnect

notifications:
  email: false


# linux stuff ====

dist: trusty

sudo: false

addons:
  apt:
    packages:
      - pdf2svg
      - libudunits2-dev


# macOS stuff ====

disable_homebrew: false

brew_packages:
  - pandoc

# script is part of base travis R

jobs:
  fast_finish: true
  allow_failures:
    - r: devel
  include:
    - stage: deploy
      os: linux
      r: oldrel
      script:
        # run test coverage
        - Rscript -e 'covr::codecov()'
        # auth machine for github to get accio submodule
        - echo -e "machine github.com\n  login $GITHUB_PAT" >> ~/.netrc
        - git submodule update --init
        - R CMD INSTALL .
        # make website
        - Rscript -e 'pkgdown::build_site()'
        # repeated install is necessary, because packrat otherwise does not know where pensieve came from
        - Rscript -e "devtools::install_github(repo = 'maxheld83/pensieve', force = TRUE, ref = '${TRAVIS_BRANCH}')"
        # auth shiny
        - Rscript -e "rsconnect::setAccountInfo(name='maxheld83', token='${SHINYAPPS_TOKEN}', secret='${SHINYAPPS_SECRET}')"
      deploy:
        # accio
        - provider: script
          script:
          - Rscript -e "rsconnect::deployApp(appDir = 'inst/accio/', appName = 'accio')"
          skip_cleanup: true
          on:
          branch: master
        - provider: script
          script:
            - Rscript -e "rsconnect::deployApp(appDir = 'inst/accio/', appName = 'accio-${TRAVIS_BRANCH}')"
          skip_cleanup: true
          on:
            all_branches: true
            condition: "$TRAVIS_BRANCH != master"
        # site
        - provider: firebase
          token: $FIREBASE_TOKEN
          project: pensieve-169bf
          skip_cleanup: true
          on:
            branch: master
        - provider: pages
          github_token: $GITHUB_PAT
          local_dir: docs/
          skip_cleanup: true
          on:
            branch: dev
@BanzaiMan
Copy link
Contributor

fast_finish is a build level concern, so this behavior seems correct to me.

However, you are correct to point out that currently we do not move to the next stage when the remaining jobs in the present stage are all allowed to fail.

@gaborbernat
Copy link

I would just add that it could be worth evaluating the deploy on flags eagerly too. E.g. if I have a build stage that is triggered on a given branch only, no need to wait around the evaluation of that stage.

@stale
Copy link

stale bot commented Oct 2, 2018

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue in 7 days. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please respond before the issue is closed, or open a new one after. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues

@stale stale bot added the stale label Oct 2, 2018
@peternewman
Copy link

I believe the build still currently doesn't move onto deploy as soon as all the jobs which must pass have successfully finished, hence this issue isn't stale.

@jonhoo
Copy link

jonhoo commented Nov 25, 2018

Not sure if this is related, but in https://travis-ci.org/jonhoo/rust-imap/builds/459508822 I cancelled the last job, which is allowed to fail, and the build was not marked as successful? In theory, the job should have been marked as successful once the previous stage completed since fast_finish is on, but that didn't happen either.

@mkurz
Copy link

mkurz commented Nov 27, 2018

@jonhoo Same here. If we cancel the last job (which is allowed to fail) the whole build is doomed - however it should be marked successful because every other job was green.
Maybe we should open a new issue for that wrong behaviour?

@jonhoo
Copy link

jonhoo commented Nov 27, 2018

@mkurz filed as #10356

@DrTorte
Copy link
Contributor

DrTorte commented Dec 5, 2018

Hello,

We're moving our community communications to the Travis CI Community Forum and will no longer be supporting GitHub issues. If this hasn't been solved, please go ahead and create a new thread on the Forum and we'll be better able to help you there. We're looking forward to seeing you there.

If you need support, you can reach our support team here: support@travis-ci.com.

Thanks and happy building!

@DrTorte DrTorte closed this as completed Dec 5, 2018
@jonhoo
Copy link

jonhoo commented Dec 5, 2018

jrfnl added a commit to WordPress/WordPress-Coding-Standards that referenced this issue May 17, 2019
Travis now offers stages. Using stages we can:
- Run the code style related checks before running any unit tests and stop the build early if any are detected.
- Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.2 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests.

While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we:
* Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found.
* We won't be wasting Travis's resources on builds which wil have to be re-run anyway.

Ref: https://docs.travis-ci.com/user/build-stages/

Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected.

For more discussion about this:
* travis-ci/travis-ci#7789
* https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217
* https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090
* travis-ci/travis-ci#9677
jrfnl added a commit to WordPress/WordPress-Coding-Standards that referenced this issue May 17, 2019
Travis now offers stages. Using stages we can:
- Run the code style related checks before running any unit tests and stop the build early if any are detected.
- Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.2 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests.

While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we:
* Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found.
* We won't be wasting Travis's resources on builds which wil have to be re-run anyway.

Ref: https://docs.travis-ci.com/user/build-stages/

Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected.

For more discussion about this:
* travis-ci/travis-ci#7789
* https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217
* https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090
* travis-ci/travis-ci#9677
jrfnl added a commit to WordPress/WordPress-Coding-Standards that referenced this issue May 22, 2019
Travis now offers stages. Using stages we can:
- Run the code style related checks before running any unit tests and stop the build early if any are detected.
- Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.2 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests.

While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we:
* Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found.
* We won't be wasting Travis's resources on builds which wil have to be re-run anyway.

Ref: https://docs.travis-ci.com/user/build-stages/

Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected.

For more discussion about this:
* travis-ci/travis-ci#7789
* https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217
* https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090
* travis-ci/travis-ci#9677
jrfnl added a commit to WordPress/WordPress-Coding-Standards that referenced this issue May 22, 2019
Travis now offers stages. Using stages we can:
- Run the code style related checks before running any unit tests and stop the build early if any are detected.
- Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.2 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests.

While this does mean that the unit tests will run with a slight delay (the `Sniff` and `Rulesets` stages have to finish before they start), it also means that we:
* Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found.
* We won't be wasting Travis's resources on builds which will have to be re-run anyway.

Ref: https://docs.travis-ci.com/user/build-stages/

Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected.

For more discussion about this:
* travis-ci/travis-ci#7789
* https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217
* https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090
* travis-ci/travis-ci#9677
jrfnl added a commit to WordPress/WordPress-Coding-Standards that referenced this issue May 22, 2019
Travis now offers stages. Using stages we can:
- Run the code style related checks before running any unit tests and stop the build early if any are detected.
- Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.2 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests.

While this does mean that the unit tests will run with a slight delay (the `Sniff` and `Rulesets` stages have to finish before they start), it also means that we:
* Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found.
* We won't be wasting Travis's resources on builds which will have to be re-run anyway.

Ref: https://docs.travis-ci.com/user/build-stages/

Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected.

For more discussion about this:
* travis-ci/travis-ci#7789
* https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217
* https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090
* travis-ci/travis-ci#9677
jrfnl added a commit to PHPCompatibility/PHPCompatibility that referenced this issue May 22, 2019
Travis now offers stages. Using stages we can:
- Run the code style related checks before running any unit tests and stop the build early if any are detected.
- Only run the (heavy) code coverage builds when we already know that the unit tests for most build pass.

While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we:
* Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found.
* We won't be wasting Travis's resources on builds which will have to be re-run anyway.
* The output of the Travis jobs will be a lot easier to decipher as it only shows the output related to that particular stage.

Ref: https://docs.travis-ci.com/user/build-stages/

Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected.

For more discussion about this:
* travis-ci/travis-ci#7789
* https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217
* https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090
* travis-ci/travis-ci#9677

In addition to this, this PR:
* Removes `sudo: false` as it is no longer supported.
    This switches the build form container-based builds to VM based.
    See: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
* Groups the two separate `cache` directives together.
* Simplifies the setting of the `env` variable for the PHPUnit version for those PHP versions which cannot use the Travis image default PHPUnit version.
* Removes the global `COVERALLS_VERSION` `env` variable which is no longer needed.
* Updates the PHPCS versions in the "mix it up" builds.
* Removes `composer self-update` which is no longer needed. Travis does this by default.
* Adds `--no-update` to the additional Composer requires so we only invoke `composer install` once, instead of potentially four times.
* Attempts to make the script more readable by using multi-line conditions whenever the line would become quite long.
jrfnl added a commit to PHPCompatibility/PHPCompatibility that referenced this issue May 22, 2019
Travis now offers stages. Using stages we can:
- Run the code style related checks before running any unit tests and stop the build early if any are detected.
- Only run the (heavy) code coverage builds when we already know that the unit tests for most builds pass.

While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we:
* Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found.
* We won't be wasting Travis's resources on builds which will have to be re-run anyway.
* The output of the Travis jobs will be a lot easier to decipher as it only shows the output related to that particular stage.

Ref: https://docs.travis-ci.com/user/build-stages/

Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected.

For more discussion about this:
* travis-ci/travis-ci#7789
* https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217
* https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090
* travis-ci/travis-ci#9677

In addition to this, this PR:
* Removes `sudo: false` as it is no longer supported.
    This switches the build form container-based builds to VM based.
    See: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
* Groups the two separate `cache` directives together.
* Simplifies the setting of the `env` variable for the PHPUnit version for those PHP versions which cannot use the Travis image default PHPUnit version.
* Removes the global `COVERALLS_VERSION` `env` variable which is no longer needed.
* Updates the PHPCS versions in the "mix it up" builds.
* Removes `composer self-update` which is no longer needed. Travis does this by default.
* Adds `--no-update` to the additional Composer requires so we only invoke `composer install` once, instead of potentially four times.
* Updates the PHP `lint` command to have simpler output (no more the long list of files).
* Attempts to make the script more readable by using multi-line conditions whenever the line would become quite long.
jrfnl added a commit to PHPCompatibility/PHPCompatibility that referenced this issue May 22, 2019
Travis now offers stages. Using stages we can:
- Run the code style related checks before running any unit tests and stop the build early if any are detected.
- Only run the (heavy) code coverage builds when we already know that the unit tests for most builds pass.

While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we:
* Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found.
* We won't be wasting Travis's resources on builds which will have to be re-run anyway.
* The output of the Travis jobs will be a lot easier to decipher as it only shows the output related to that particular stage.

Ref: https://docs.travis-ci.com/user/build-stages/

Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected.

For more discussion about this:
* travis-ci/travis-ci#7789
* https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217
* https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090
* travis-ci/travis-ci#9677

In addition to this, this PR:
* Removes `sudo: false` as it is no longer supported.
    This switches the build form container-based builds to VM based.
    See: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
* Groups the two separate `cache` directives together.
* Simplifies the setting of the `env` variable for the PHPUnit version for those PHP versions which cannot use the Travis image default PHPUnit version.
* Removes the global `COVERALLS_VERSION` `env` variable which is no longer needed.
* Updates the PHPCS versions in the "mix it up" builds.
* Removes `composer self-update` which is no longer needed. Travis does this by default.
* Adds `--no-update` to the additional Composer requires so we only invoke `composer install` once, instead of potentially four times.
* Updates the PHP `lint` command to have simpler output (no more the long list of files).
* Attempts to make the script more readable by using multi-line conditions whenever the line would become quite long.
jrfnl added a commit to PHPCompatibility/PHPCompatibility that referenced this issue May 22, 2019
Travis now offers stages. Using stages we can:
- Run the code style related checks before running any unit tests and stop the build early if any are detected.
- Only run the (heavy) code coverage builds when we already know that the unit tests for most builds pass.

While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we:
* Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found.
* We won't be wasting Travis's resources on builds which will have to be re-run anyway.
* The output of the Travis jobs will be a lot easier to decipher as it only shows the output related to that particular stage.

Ref: https://docs.travis-ci.com/user/build-stages/

Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected.

For more discussion about this:
* travis-ci/travis-ci#7789
* https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217
* https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090
* travis-ci/travis-ci#9677

In addition to this, this PR makes the following changes to the Travis script:
* Removes `sudo: false` as it is no longer supported.
    This switches the build form container-based builds to VM based.
    See: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
* Groups the two separate `cache` directives together.
* Simplifies the setting of the `env` variable for the PHPUnit version for those PHP versions which cannot use the Travis image default PHPUnit version.
* Removes the global `COVERALLS_VERSION` `env` variable which is no longer needed.
* Updates the PHPCS versions in the "mix it up" builds.
* Removes `composer self-update` which is no longer needed. Travis does this by default.
* Adds `--no-update` to the additional Composer requires so we only invoke `composer install` once, instead of potentially four times.
* Updates the PHP `lint` command to have simpler output (no more the long list of files).
* Attempts to make the script more readable by using multi-line conditions whenever the line would become quite long.

It also removes the `phpunit-travis.xml` file and moves the additional config into the normal `phpunit.xml.dist` file. To run PHPUnit without code coverage, either run it on a PHP version without Xdebug enabled or run it with the `--no-coverage` command-line flag.

This flag has also been added to the relevant commands in the Travis build script.
jrfnl added a commit to PHPCompatibility/PHPCompatibility that referenced this issue May 22, 2019
Travis now offers stages. Using stages we can:
- Run the code style related checks before running any unit tests and stop the build early if any are detected.
- Only run the (heavy) code coverage builds when we already know that the unit tests for most builds pass.

While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we:
* Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found.
* We won't be wasting Travis's resources on builds which will have to be re-run anyway.
* The output of the Travis jobs will be a lot easier to decipher as it only shows the output related to that particular stage.

Ref: https://docs.travis-ci.com/user/build-stages/

Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected.

For more discussion about this:
* travis-ci/travis-ci#7789
* https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217
* https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090
* travis-ci/travis-ci#9677

In addition to this, this PR makes the following changes to the Travis script:
* Removes `sudo: false` as it is no longer supported.
    This switches the build form container-based builds to VM based.
    See: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
* Groups the two separate `cache` directives together.
* Simplifies the setting of the `env` variable for the PHPUnit version for those PHP versions which cannot use the Travis image default PHPUnit version.
* Removes the global `COVERALLS_VERSION` `env` variable which is no longer needed.
* Updates the PHPCS versions in the "mix it up" builds.
* Removes `composer self-update` which is no longer needed. Travis does this by default.
* Adds `--no-update` to the additional Composer requires so we only invoke `composer install` once, instead of potentially four times.
* Updates the PHP `lint` command to have simpler output (no more the long list of files).
* Attempts to make the script more readable by using multi-line conditions whenever the line would become quite long.

It also removes the `phpunit-travis.xml` file and moves the additional config into the normal `phpunit.xml.dist` file. To run PHPUnit without code coverage, either run it on a PHP version without Xdebug enabled or run it with the `--no-coverage` command-line flag.

This flag has also been added to the relevant commands in the Travis build script.
jrfnl added a commit to WPTT/WPThemeReview that referenced this issue May 23, 2019
Travis now offers stages. Using stages we can:
- Run the code style related checks before running any unit tests and stop the build early if any are detected.

While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we:
* Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found.
* We won't be wasting Travis's resources on builds which will have to be re-run anyway.
* The output of the Travis jobs will be a lot easier to decipher as it only shows the output related to that particular stage.

Ref: https://docs.travis-ci.com/user/build-stages/

Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected.

For more discussion about this:
* travis-ci/travis-ci#7789
* https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217
* https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090
* travis-ci/travis-ci#9677
jrfnl added a commit to WPTT/WPThemeReview that referenced this issue May 23, 2019
Travis now offers stages. Using stages we can:
- Run the code style related checks before running any unit tests and stop the build early if any are detected.

While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we:
* Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found.
* We won't be wasting Travis's resources on builds which will have to be re-run anyway.
* The output of the Travis jobs will be a lot easier to decipher as it only shows the output related to that particular stage.

Ref: https://docs.travis-ci.com/user/build-stages/

Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected.

For more discussion about this:
* travis-ci/travis-ci#7789
* https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217
* https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090
* travis-ci/travis-ci#9677
jrfnl added a commit to Yoast/yoastcs that referenced this issue Jul 31, 2019
Travis now offers stages. Using stages we can:
- Run the code style related checks before running any unit tests and stop the build early if any are detected.
- Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.1 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests.
- Add a separate "quicktest" stage for non-PR/merge builds.
    The "quicktest" stage will only run a CS check, ruleset check, linting and the unit tests against low/high PHP/PHPCS/WPCS combinations. This should catch most issues.
    The more comprehensive complete build against a larger combination of PHP/PHPCS/WPCS combination will now only be run on PRs and merges to `develop`/`master`.

While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we:
* Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found.
* We won't be wasting Travis's resources on builds which will have to be re-run anyway.

Ref: https://docs.travis-ci.com/user/build-stages/

Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected.

For more discussion about this:
* travis-ci/travis-ci#7789
* https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217
* https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090
* travis-ci/travis-ci#9677
jrfnl added a commit to Yoast/yoastcs that referenced this issue Jul 31, 2019
Travis now offers stages. Using stages we can:
- Run the code style related checks before running any unit tests and stop the build early if any are detected.
- Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.1 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests.
- Add a separate "quicktest" stage for non-PR/merge builds.
    The "quicktest" stage will only run a CS check, ruleset check, linting and the unit tests against low/high PHP/PHPCS/WPCS combinations. This should catch most issues.
    The more comprehensive complete build against a larger combination of PHP/PHPCS/WPCS combination will now only be run on PRs and merges to `develop`/`master`.

While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we:
* Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found.
* We won't be wasting Travis's resources on builds which will have to be re-run anyway.

Ref: https://docs.travis-ci.com/user/build-stages/

Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected.

For more discussion about this:
* travis-ci/travis-ci#7789
* https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217
* https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090
* travis-ci/travis-ci#9677
jrfnl added a commit to Yoast/yoastcs that referenced this issue Jul 31, 2019
Travis now offers stages. Using stages we can:
- Run the code style related checks before running any unit tests and stop the build early if any are detected.
- Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.1 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests.
- Add a separate "quicktest" stage for non-PR/merge builds.
    The "quicktest" stage will only run a CS check, ruleset check, linting and the unit tests against low/high PHP/PHPCS/WPCS combinations. This should catch most issues.
    The more comprehensive complete build against a larger combination of PHP/PHPCS/WPCS combination will now only be run on PRs and merges to `develop`/`master`.

While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we:
* Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found.
* We won't be wasting Travis's resources on builds which will have to be re-run anyway.

Ref: https://docs.travis-ci.com/user/build-stages/

Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected.

For more discussion about this:
* travis-ci/travis-ci#7789
* https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217
* https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090
* travis-ci/travis-ci#9677
jrfnl added a commit to Yoast/yoastcs that referenced this issue Jul 31, 2019
Travis now offers stages. Using stages we can:
- Run the code style related checks before running any unit tests and stop the build early if any are detected.
- Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.1 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests.
- Add a separate "quicktest" stage for non-PR/merge builds.
    The "quicktest" stage will only run a CS check, ruleset check, linting and the unit tests against low/high PHP/PHPCS/WPCS combinations. This should catch most issues.
    The more comprehensive complete build against a larger combination of PHP/PHPCS/WPCS combination will now only be run on PRs and merges to `develop`/`master`.

While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we:
* Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found.
* We won't be wasting Travis's resources on builds which will have to be re-run anyway.

Ref: https://docs.travis-ci.com/user/build-stages/

Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected.

For more discussion about this:
* travis-ci/travis-ci#7789
* https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217
* https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090
* travis-ci/travis-ci#9677
jrfnl added a commit to Yoast/yoastcs that referenced this issue Jul 31, 2019
Travis now offers stages. Using stages we can:
- Run the code style related checks before running any unit tests and stop the build early if any are detected.
- Remove the duplicate unit test runs - i.e. previously we had an extra (third) build against PHP 7.1 (now changed to 7.3) which would run the code style related checks, but would also re-run the unit tests. This extra build will now no longer run the unit tests.
- Add a separate "quicktest" stage for non-PR/merge builds.
    The "quicktest" stage will only run a CS check, ruleset check, linting and the unit tests against low/high PHP/PHPCS/WPCS combinations. This should catch most issues.
    The more comprehensive complete build against a larger combination of PHP/PHPCS/WPCS combination will now only be run on PRs and merges to `develop`/`master`.

While this does mean that the unit tests will run with a slight delay (the `Sniff` stage has to finish before they start), it also means that we:
* Get code style errors reported earlier as it's been moved to be the first stage and the build will just stop if any are found.
* We won't be wasting Travis's resources on builds which will have to be re-run anyway.

Ref: https://docs.travis-ci.com/user/build-stages/

Note that `Allowed failures` is no longer listed as a separate block in the Travis result overview, but is _is_ respected.

For more discussion about this:
* travis-ci/travis-ci#7789
* https://travis-ci.community/t/always-show-allow-failures-allowed-failures-when-build-stages-are-used/217
* https://travis-ci.community/t/work-out-kinks-in-interactions-between-stages-allow-fail-and-fast-finish/1090
* travis-ci/travis-ci#9677
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants