-
Notifications
You must be signed in to change notification settings - Fork 12
74 lines (62 loc) · 1.84 KB
/
test.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
name: Test
on:
pull_request:
paths-ignore:
- 'README.md'
push:
branches:
- main
paths-ignore:
- 'README.md'
workflow_dispatch:
jobs:
check-line-endings:
name: Check CRLF line endings
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: Checkout repository contents
uses: actions/checkout@v4
- name: Use action to check for CRLF endings
uses: erclu/check-crlf@v1
run-tests:
name: Run tests
strategy:
fail-fast: true
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 5
needs: check-line-endings
steps:
- name: Checkout repository contents
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: |
pip install poetry
poetry install
- name: Run pytest tests
run: |
poetry run pytest
# Disabled by vduseev on 2024-02-21
# because it's clear we are not using mypy here
#- name: Run mypy tests
# run: |
# bash -c '! poetry run mypy --strict dtcli | grep "Module has no attribute"'
- name: Run flake8 lint checker
run: |
poetry run flake8 dtcli
- name: Run test coverage report
run: |
poetry run pytest --cov . --cov-report html || true
- name: Check that the package can be built
run: |
poetry build
- name: Check that we can generate a CA certificate
run: |
poetry run dt ext genca --ca-cert ./ca.pem --ca-key ./ca.key --ca-subject "/CN=Default/O=Company/OU=Extension" --no-ca-passphrase --force