-
Notifications
You must be signed in to change notification settings - Fork 5
78 lines (73 loc) · 1.98 KB
/
pull-request.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
name: pull request
on:
pull_request:
push:
branches: [ main ]
jobs:
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install Requirements
run:
pip install -r requirements.txt
- name: Pylint
run:
pylint src/
- name: Black
run:
black --check ./
- name: Type Check (mypy)
run: mypy src --strict
- name: Unit Tests
run:
python -m pytest tests/unit
env:
# We make a rinkeby request in one unit test
INFURA_KEY: ${{ secrets.INFURA_KEY }}
tenderly-ci:
name: Tenderly Lint & Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: DB Migration
uses: joshuaavalon/[email protected]
with:
url: jdbc:postgresql://postgres:5432/postgres
user: postgres
password: postgres
env:
FLYWAY_LOCATIONS: filesystem:./internal_transfers/database/sql
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 16
- name: Install Node.js dependencies
run: npm ci
working-directory: ./internal_transfers/actions
- name: ESLint
run: npm run lint
working-directory: ./internal_transfers/actions
- name: Tests
run: npm run test --silent
working-directory: ./internal_transfers/actions
env:
NODE_URL: ${{ secrets.NODE_URL }}