-
Notifications
You must be signed in to change notification settings - Fork 50
113 lines (91 loc) · 2.66 KB
/
ci.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
- v*
jobs:
linter:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install linter and formatter dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements_developers.txt
- name: Lint with flake8
run: flake8 src/ tests/
- name: Check black format
run: black --check --diff src/ tests/
build-trd:
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
name: "🐍 ${{ matrix.python-version }} • ${{ matrix.runs-on }}"
runs-on: ${{ matrix.runs-on }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install software dependencies
shell: bash
run: |
sudo apt-get update -y
sudo apt-get install graphviz -y
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r requirements_developers.txt
- name: Test with pytest
run: pytest tests/
build-documentation:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install graphviz -y
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r requirements_developers.txt
- name: Generate diagrams
run: python docs/fsm/graphviz/draw_state_diagrams.py
- name: Build documentation
uses: ammaraskar/sphinx-action@master
with:
docs-folder: docs/
pre-build-command: |
mkdir -p docs/build/
touch docs/build/.nojekyll
python -m pip install -r requirements_developers.txt
build-command: sphinx-build -b html . build
build-docker:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build the docker image
run: docker build -t trdo/tezos-reward-distributor .