-
Notifications
You must be signed in to change notification settings - Fork 71
45 lines (41 loc) · 1.43 KB
/
push.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
name: tests
on:
push:
branches:
- "*"
pull_request:
jobs:
test:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest, macOS-latest]
exclude:
# No longer supported on GitHub CI.
- python-version: 3.5
os: "ubuntu-latest"
- python-version: 3.6
os: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# Confirm that the `python` maps to the version we just installed.
# PowerShell on Windows does this differently than the Unix shells.
- run: which python ; python --version ; which pip ; pip --version
if: matrix.os != 'windows-latest'
- run: get-command python ; python --version ; get-command pip ; pip --version
if: matrix.os == 'windows-latest'
- run: git --version
# macOS doesn't currently have Mercurial installed by default.
- run: pip install wheel && pip install mercurial
if: matrix.os == 'macOS-latest'
# Install test dependencies, like flake8.
- run: pip install -r ./requirements-dev.txt
# Run tests.
- run: python test.py -v