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

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