-
Notifications
You must be signed in to change notification settings - Fork 2
85 lines (80 loc) · 1.99 KB
/
main.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
Linting:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Set up Python"
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: run pre-commit
run: |
pip install pre-commit
pre-commit run --all-files
Docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Set up Python"
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install doc dependencies
run: |
sudo apt-get update -y
sudo apt-get install pandoc
sudo apt-get update -y
pip install -e .[dev]
- name: Build docs
run: |
cd docs
python -m sphinx -TEWb html source build
Typing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Set up Python"
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: install dependencies
run: |
pip install -e .[dev]
- name: run mypy
run: |
mypy -v mitosis
Tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 4
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install .[dev]
- name: Test with pytest
run: |
coverage run --source=mitosis -m pytest mitosis/tests -m "clean or not clean" && coverage xml
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-