-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (58 loc) · 1.38 KB
/
ci.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
name: Continuous Integration
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
branches:
- main
release:
env:
PYTHON_VERSION: 3.10.6
POETRY_VERSION: 1.2.0
NODE_VERSION: 18.8.0
NODE_ENV: production
jobs:
build:
name: Test, lint, and build everything.
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup nodejs
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
cache-dependency-path: web/package-lock.json
- name: Cache Python dependencies
uses: actions/cache@v2
with:
path: ~/.local
key: poetry-0
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: ${{ env.POETRY_VERSION }}
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: poetry
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build web site
working-directory: web
run: |
npm ci
npm run build
- name: Lint and test Python code
run: |
poetry install
poetry run black . --check
poetry run mypy .
poetry run ruff .