]> git.madduck.net Git - etc/vim.git/blob - .github/workflows/test.yml

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:

remove all type: ignores in src/black (GH-2720)
[etc/vim.git] / .github / workflows / test.yml
1 name: Test
2
3 on:
4   push:
5     paths-ignore:
6       - "docs/**"
7       - "*.md"
8
9   pull_request:
10     paths-ignore:
11       - "docs/**"
12       - "*.md"
13
14 jobs:
15   build:
16     # We want to run on external PRs, but not on our own internal PRs as they'll be run
17     # by the push to the branch. Without this if check, checks are duplicated since
18     # internal PRs match both the push and pull_request events.
19     if:
20       github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
21       github.repository
22
23     runs-on: ${{ matrix.os }}
24     strategy:
25       fail-fast: false
26       matrix:
27         python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "pypy-3.7"]
28         os: [ubuntu-latest, macOS-latest, windows-latest]
29
30     steps:
31       - uses: actions/checkout@v2
32
33       - name: Set up Python ${{ matrix.python-version }}
34         uses: actions/setup-python@v2
35         with:
36           python-version: ${{ matrix.python-version }}
37
38       - name: Install dependencies
39         run: |
40           python -m pip install --upgrade pip
41           python -m pip install --upgrade tox
42
43       - name: Unit tests
44         if: "!startsWith(matrix.python-version, 'pypy')"
45         run: |
46           tox -e ci-py -- -v --color=yes
47
48       - name: Unit tests pypy
49         if: "startsWith(matrix.python-version, 'pypy')"
50         run: |
51           tox -e ci-pypy3 -- -v --color=yes
52
53       - name: Publish coverage to Coveralls
54         # If pushed / is a pull request against main repo AND
55         # we're running on Linux (this action only supports Linux)
56         if:
57           ((github.event_name == 'push' && github.repository == 'psf/black') ||
58           github.event.pull_request.base.repo.full_name == 'psf/black') && matrix.os ==
59           'ubuntu-latest'
60
61         uses: AndreMiras/coveralls-python-action@v20201129
62         with:
63           github-token: ${{ secrets.GITHUB_TOKEN }}
64           parallel: true
65           flag-name: py${{ matrix.python-version }}-${{ matrix.os }}
66           debug: true
67
68   coveralls-finish:
69     needs: build
70     # If pushed / is a pull request against main repo
71     if:
72       (github.event_name == 'push' && github.repository == 'psf/black') ||
73       github.event.pull_request.base.repo.full_name == 'psf/black'
74
75     runs-on: ubuntu-latest
76     steps:
77       - uses: actions/checkout@v2
78       - name: Coveralls finished
79         uses: AndreMiras/coveralls-python-action@v20201129
80         with:
81           parallel-finished: true
82           debug: true