]> 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:

Deprecate Python 2 formatting support (#2523)
[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"]
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         run: |
45           tox -e ci-py -- -v --color=yes
46
47       - name: Publish coverage to Coveralls
48         # If pushed / is a pull request against main repo AND
49         # we're running on Linux (this action only supports Linux)
50         if:
51           ((github.event_name == 'push' && github.repository == 'psf/black') ||
52           github.event.pull_request.base.repo.full_name == 'psf/black') && matrix.os ==
53           'ubuntu-latest'
54
55         uses: AndreMiras/coveralls-python-action@v20201129
56         with:
57           github-token: ${{ secrets.GITHUB_TOKEN }}
58           parallel: true
59           flag-name: py${{ matrix.python-version }}-${{ matrix.os }}
60           debug: true
61
62   coveralls-finish:
63     needs: build
64     # If pushed / is a pull request against main repo
65     if:
66       (github.event_name == 'push' && github.repository == 'psf/black') ||
67       github.event.pull_request.base.repo.full_name == 'psf/black'
68
69     runs-on: ubuntu-latest
70     steps:
71       - uses: actions/checkout@v2
72       - name: Coveralls finished
73         uses: AndreMiras/coveralls-python-action@v20201129
74         with:
75           parallel-finished: true
76           debug: true