SubmittingPatches: replace discussion of Travis with GitHub Actions

Replace the discussion of Travis CI added in
0e5d028a7a (Documentation: add setup instructions for Travis CI,
2016-05-02) with something that covers the GitHub Actions added in
889cacb689 (ci: configure GitHub Actions for CI/PR, 2020-04-11).

The setup is trivial compared to using Travis, and it even works on
Windows (that "hopefully soon" comment was probably out-of-date on
Travis as well).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ævar Arnfjörð Bjarmason 2021-07-22 14:11:24 +02:00 committed by Junio C Hamano
parent 4523dc8624
commit f003a91f5c

View file

@ -74,10 +74,9 @@ the feature triggers the new behavior when it should, and to show the
feature does not trigger when it shouldn't. After any code change, make feature does not trigger when it shouldn't. After any code change, make
sure that the entire test suite passes. sure that the entire test suite passes.
If you have an account at GitHub (and you can get one for free to work Pushing to a fork of https://github.com/git/git will use their CI
on open source projects), you can use their Travis CI integration to integration to test your changes on Linux, Mac and Windows. See the
test your changes on Linux, Mac (and hopefully soon Windows). See <<GHCI,GitHub CI>> section for details.
GitHub-Travis CI hints section for details.
Do not forget to update the documentation to describe the updated Do not forget to update the documentation to describe the updated
behavior and make sure that the resulting documentation set formats behavior and make sure that the resulting documentation set formats
@ -449,13 +448,12 @@ their trees themselves.
entitled "What's cooking in git.git" and "What's in git.git" giving entitled "What's cooking in git.git" and "What's in git.git" giving
the status of various proposed changes. the status of various proposed changes.
[[travis]] == GitHub CI[[GHCI]]]
== GitHub-Travis CI hints
With an account at GitHub (you can get one for free to work on open With an account at GitHub, you can use GitHub CI to test your changes
source projects), you can use Travis CI to test your changes on Linux, on Linux, Mac and Windows. See
Mac (and hopefully soon Windows). You can find a successful example https://github.com/git/git/actions/workflows/main.yml for examples of
test build here: https://travis-ci.org/git/git/builds/120473209 recent CI runs.
Follow these steps for the initial setup: Follow these steps for the initial setup:
@ -463,31 +461,18 @@ Follow these steps for the initial setup:
You can find detailed instructions how to fork here: You can find detailed instructions how to fork here:
https://help.github.com/articles/fork-a-repo/ https://help.github.com/articles/fork-a-repo/
. Open the Travis CI website: https://travis-ci.org After the initial setup, CI will run whenever you push new changes
. Press the "Sign in with GitHub" button.
. Grant Travis CI permissions to access your GitHub account.
You can find more information about the required permissions here:
https://docs.travis-ci.com/user/github-oauth-scopes
. Open your Travis CI profile page: https://travis-ci.org/profile
. Enable Travis CI builds for your Git fork.
After the initial setup, Travis CI will run whenever you push new changes
to your fork of Git on GitHub. You can monitor the test state of all your to your fork of Git on GitHub. You can monitor the test state of all your
branches here: https://travis-ci.org/__<Your GitHub handle>__/git/branches branches here: https://github.com/<Your GitHub handle>/git/actions/workflows/main.yml
If a branch did not pass all test cases then it is marked with a red If a branch did not pass all test cases then it is marked with a red
cross. In that case you can click on the failing Travis CI job and cross. In that case you can click on the failing job and navigate to
scroll all the way down in the log. Find the line "<-- Click here to see "ci/run-build-and-tests.sh" and/or "ci/print-test-failures.sh". You
detailed test output!" and click on the triangle next to the log line can also download "Artifacts" which are tarred (or zipped) archives
number to expand the detailed test output. Here is such a failing with test data relevant for debugging.
example: https://travis-ci.org/git/git/jobs/122676187
Fix the problem and push your fix to your Git fork. This will trigger Then fix the problem and push your fix to your GitHub fork. This will
a new Travis CI build to ensure all tests pass. trigger a new CI build to ensure all tests pass.
[[mua]] [[mua]]
== MUA specific hints == MUA specific hints