-
Notifications
You must be signed in to change notification settings - Fork 2
79 lines (74 loc) · 2.77 KB
/
tests-skip.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# This is just a dummy workflow to handle skipped but required branch
# protection status checks
# (https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks).
# In the repository settings, one can specify workflows that must finish
# successfully before a pull request can be merged with the protected
# branch. However, these required workflows might not be triggered by
# all pull requests, depending on the triggering rules of the workflow.
# To handle the case when a workflow is required but not triggered,
# create a dummy workflow with exactly the same name as the required
# workflow that is always triggered when the required workflow is not
# triggered and that simulates a successful workflow run. See
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
# However, be aware that both workflows are triggered if two (or more)
# files are changed and one of them is listed in the requested
# workflow's `paths` list (which is the same as this workflow's
# `paths-ignore` list) and the other is not. See
# https://github.com/github/docs/issues/21865
# Keep in sync with `test.yml`.
name: "Tests"
on:
push:
branches:
- "**"
paths-ignore:
- ".github/**"
- "**.py"
- "**.rst"
- "docs/**"
- ".flake8"
- "pyproject.toml"
- "**requirements*.txt"
tags-ignore:
- "v[0-9]*"
jobs:
lint:
strategy:
matrix:
os:
- "ubuntu-latest"
python-version:
- "3.9"
runs-on: "${{ matrix.os }}"
steps:
- name: "Skip ${{ github.job }}"
run: |
echo "${{ github.job }} (${{ matrix.os }}, ${{ matrix.python-version }}) skipped (no files to check)"
test:
strategy:
matrix:
# Tests must be run on all target platforms and Python versions.
os:
- "ubuntu-latest"
- "macos-latest"
- "windows-latest"
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
# Python 3.6 is not supported anymore in the Ubuntu 22.04 runner
# https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
exclude:
- os: "ubuntu-latest"
python-version: "3.6"
include:
- os: "ubuntu-20.04"
python-version: "3.6"
# Do not cancel in-progress jobs if any matrix job fails
fail-fast: false
runs-on: "${{ matrix.os }}"
steps:
- name: "Skip"
run: |
echo "${{ github.job }} (${{ matrix.os }}, ${{ matrix.python-version }}) skipped (no files to check)"