-
Notifications
You must be signed in to change notification settings - Fork 17
71 lines (67 loc) · 1.7 KB
/
tests.yaml
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
name: Tests
on:
pull_request:
push:
branches:
- main
jobs:
linters:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install python packages and dependencies
run: |
pip install -U .[dev]
- name: Run black
run: |
make test-black
- name: Run codespell
run: |
make test-codespell
- name: Run flake8
run: |
make test-flake8
- name: Run isort
run: |
make test-isort
- name: Run mypy
run: |
make test-mypy
- name: Run pydocstyle
run: |
make test-pydocstyle
- name: Run pyright
run: |
sudo snap install --classic node
sudo snap install --classic pyright
make test-pyright
tests:
strategy:
matrix:
os: [macos-12, ubuntu-20.04, ubuntu-22.04, windows-2019]
python-version: ["3.8", "3.9", "3.10"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -U .[dev]
pip install -e .
- name: Run unit tests
run: |
make test-units
- name: Run integration tests
env:
CRAFT_STORE_CHARMCRAFT_CREDENTIALS: ${{ secrets.CRAFT_STORE_CHARMCRAFT_CREDENTIALS }}
run: |
make test-integrations