]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Drop Travis CI and migrate Coveralls (#2186)
authorRichard Si <63936253+ichard26@users.noreply.github.com>
Tue, 4 May 2021 08:47:59 +0000 (04:47 -0400)
committerGitHub <noreply@github.com>
Tue, 4 May 2021 08:47:59 +0000 (10:47 +0200)
Travis CI for Open Source is shutting down in a few weeks so the queue
for jobs is insane due to lower resources. I'm 99.99% sure we don't need
it as our Test, Lint, Docs, Upload / Package, Primer, and Fuzz workflows
are all on GitHub Actions. So even though we *can* migrate to the .com
version with its 1000 free Linux minutes(?), I don't think we need to.

more information here:
- https://blog.travis-ci.com/oss-announcement
- https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing
- https://docs.travis-ci.com/user/migrate/open-source-repository-migration

This commit does the following:
- delete the Travis CI configuration
- add to the GHA test workflows so coverage continues to be recorded
  - tweaked coverage configuration so this wouldn't break
- remove any references to Travis CI in the docs (i.e. readme + sphinx
  docs)

Regarding the Travis CI to GitHub Actions Coveralls transition, the
official action doesn't support the coverage files produced by coverage.py
unfornately. Also no, I don't really know what I am doing so don't @ me
if this breaks :p (well you can, but don't expect me to be THAT useful).

The Coveralls setup has two downfalls AFAIK:
- Only Linux runs are used because AndreMiras/coveralls-python-action
  only supports Linux. Although this isn't a big issue since the Travis
  Coveralls configuration only used Linux data too.
- Pull requests from an internal branch (i.e. one on psf/black) will be
  marked as a push coverage build by Coveralls since our anti-duplicate-
  workflows system runs under the push even for such cases.

.coveragerc
.github/workflows/test.yml
.travis.yml [deleted file]
README.md
docs/conf.py

index 32a8da521ba3e72be3e327cdcca85dc716ac455e..f05041ca1dcd199ba5aa2762d3179ae3c1a45712 100644 (file)
@@ -3,3 +3,6 @@ omit =
   src/blib2to3/*
   tests/data/*
   */site-packages/*
+
+[run]
+relative_files = True
index bec769064c2c7e544b50c3cdfd109994a1012f0a..03adc7f0beac92f4d73840ccfcea2ac26cd3745d 100644 (file)
@@ -34,3 +34,34 @@ jobs:
       - name: Unit tests
         run: |
           tox -e py
+
+      - name: Publish coverage to Coveralls
+        # If pushed / is a pull request against main repo AND
+        # we're running on Linux (this action only supports Linux)
+        if:
+          ((github.event_name == 'push' && github.repository == 'psf/black') ||
+          github.event.pull_request.base.repo.full_name == 'psf/black') && matrix.os ==
+          'ubuntu-latest'
+
+        uses: AndreMiras/coveralls-python-action@v20201129
+        with:
+          github-token: ${{ secrets.GITHUB_TOKEN }}
+          parallel: true
+          flag-name: py${{ matrix.python-version }}-${{ matrix.os }}
+          debug: true
+
+  coveralls-finish:
+    needs: build
+    # If pushed / is a pull request against main repo
+    if:
+      (github.event_name == 'push' && github.repository == 'psf/black') ||
+      github.event.pull_request.base.repo.full_name == 'psf/black'
+
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - name: Coveralls finished
+        uses: AndreMiras/coveralls-python-action@v20201129
+        with:
+          parallel-finished: true
+          debug: true
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644 (file)
index e782272..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-language: python
-cache:
-  pip: true
-  directories:
-    - $HOME/.cache/pre-commit
-env:
-  - TEST_CMD="tox -e py"
-install:
-  - pip install coverage coveralls pre-commit tox
-  - pip install -e '.[d]'
-script:
-  - $TEST_CMD
-after_success:
-  - coveralls
-notifications:
-  on_success: change
-  on_failure: always
-matrix:
-  include:
-    - name: "lint"
-      python: 3.7
-      env:
-        - TEST_CMD="pre-commit run --all-files --show-diff-on-failure"
-    - name: "3.6"
-      python: 3.6
-    - name: "3.7"
-      python: 3.7
-    - name: "3.8"
-      python: 3.8
-    - name: "3.9"
-      python: 3.9
index 41cea761df564c4efb9ca60d323deb5d6073ac9b..696bfa7e0640cd2629e04f6be76e035711417b3d 100644 (file)
--- a/README.md
+++ b/README.md
@@ -3,7 +3,6 @@
 <h2 align="center">The Uncompromising Code Formatter</h2>
 
 <p align="center">
-<a href="https://travis-ci.com/psf/black"><img alt="Build Status" src="https://travis-ci.com/psf/black.svg?branch=master"></a>
 <a href="https://github.com/psf/black/actions"><img alt="Actions Status" src="https://github.com/psf/black/workflows/Test/badge.svg"></a>
 <a href="https://github.com/psf/black/actions"><img alt="Actions Status" src="https://github.com/psf/black/workflows/Primer/badge.svg"></a>
 <a href="https://black.readthedocs.io/en/stable/?badge=stable"><img alt="Documentation Status" src="https://readthedocs.org/projects/black/badge/?version=stable"></a>
index ec6aad9a27b4c26f39c271505280b31de4ab143a..9e03d05e937ab1daff00e7d8bb62fb21bf327dc2 100644 (file)
@@ -314,7 +314,6 @@ html_theme_options = {
     "show_powered_by": True,
     "fixed_sidebar": True,
     "logo": "logo2.png",
-    "travis_button": True,
 }