-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1002 Bytes
/
pr-to-main.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
name: Format, Type Check, and Test
on:
pull_request:
branches:
- main
- "release/**"
jobs:
format_type_check_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install redis
run: sudo apt-get install -y redis-tools redis-server
- name: Verify that redis is up
run: redis-cli ping
# Install everything.
- name: Install package and dependancies
run: |
python -m pip install --upgrade pip
pip install -e ./backend[dev]
- name: Run isort
run: isort ./backend --profile black
- name: Run Black
run: black ./backend --diff --check
- name: Run mypy
run: mypy ./backend --config-file ./backend/mypy.ini
- name: Run tests
run: |
set -a
source ./backend/envs/example.env
set +a
pytest ./backend