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

Fix test that was not being run (#3939)
[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 permissions:
15   contents: read
16
17 concurrency:
18   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
19   cancel-in-progress: true
20
21 jobs:
22   main:
23     # We want to run on external PRs, but not on our own internal PRs as they'll be run
24     # by the push to the branch. Without this if check, checks are duplicated since
25     # internal PRs match both the push and pull_request events.
26     if:
27       github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
28       github.repository
29
30     runs-on: ${{ matrix.os }}
31     strategy:
32       fail-fast: false
33       matrix:
34         python-version: ["3.8", "3.9", "3.10", "3.11", "pypy-3.8"]
35         os: [ubuntu-latest, macOS-latest, windows-latest]
36
37     steps:
38       - uses: actions/checkout@v4
39
40       - name: Set up Python ${{ matrix.python-version }}
41         uses: actions/setup-python@v4
42         with:
43           python-version: ${{ matrix.python-version }}
44
45       - name: Install tox
46         run: |
47           python -m pip install --upgrade pip
48           python -m pip install --upgrade tox
49
50       - name: Unit tests
51         if: "!startsWith(matrix.python-version, 'pypy')"
52         run:
53           tox -e ci-py$(echo ${{ matrix.python-version }} | tr -d '.') -- -v --color=yes
54
55       - name: Unit tests (pypy)
56         if: "startsWith(matrix.python-version, 'pypy')"
57         run: tox -e ci-pypy3 -- -v --color=yes
58
59       - name: Upload coverage to Coveralls
60         # Upload coverage if we are on the main repository and
61         # we're running on Linux (this action only supports Linux)
62         if:
63           github.repository == 'psf/black' && matrix.os == 'ubuntu-latest' &&
64           !startsWith(matrix.python-version, 'pypy')
65         uses: AndreMiras/coveralls-python-action@8799c9f4443ac4201d2e2f2c725d577174683b99
66         with:
67           github-token: ${{ secrets.GITHUB_TOKEN }}
68           parallel: true
69           flag-name: py${{ matrix.python-version }}-${{ matrix.os }}
70           debug: true
71
72   coveralls-finish:
73     needs: main
74     if: github.repository == 'psf/black'
75
76     runs-on: ubuntu-latest
77     steps:
78       - uses: actions/checkout@v4
79       - name: Send finished signal to Coveralls
80         uses: AndreMiras/coveralls-python-action@8799c9f4443ac4201d2e2f2c725d577174683b99
81         with:
82           parallel-finished: true
83           debug: true
84
85   uvloop:
86     if:
87       github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
88       github.repository
89     runs-on: ${{ matrix.os }}
90     strategy:
91       fail-fast: false
92       matrix:
93         os: [ubuntu-latest, macOS-latest]
94
95     steps:
96       - uses: actions/checkout@v4
97
98       - name: Set up latest Python
99         uses: actions/setup-python@v4
100         with:
101           python-version: "*"
102
103       - name: Install black with uvloop
104         run: |
105           python -m pip install pip --upgrade --disable-pip-version-check
106           python -m pip install -e ".[uvloop]"
107
108       - name: Format ourselves
109         run: python -m black --check .