-
Notifications
You must be signed in to change notification settings - Fork 5
88 lines (79 loc) · 2.38 KB
/
lighthouse.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
name: 🔦 Lighthouse
on: [push]
jobs:
lhci:
runs-on: ubuntu-latest
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
postgres:
image: postgres
env:
POSTGRES_PASSWORD: 12345
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: 💾 Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: 🧹 Cleanup apt list
uses: christopherpickering/[email protected]
- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false
- name: 🐍 Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.10
- name: 🎶 Setup Poetry
uses: snok/install-poetry@v1
- name: 📥 Install
run: |
sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl pkg-config build-essential libssl-dev libffi-dev curl git wget libldap2-dev python3-dev python3-pip python3-setuptools unixodbc unixodbc-dev libpq-dev nginx sqlite3 libsqlite3-0 libsasl2-dev libxml2-dev libxmlsec1-dev libxmlsec1-dev redis-server ufw gnupg
poetry install
- name: 💽 Start test services
run: |
poetry run flask cli reset_db
poetry run flask db upgrade
poetry run flask cli seed
poetry run flask cli seed_demo
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
PGPASSWORD: 12345
REDIS_HOST: localhost
REDIS_PORT: 6379
FLASK_ENV: test
FLASK_DEBUG: false
FLASK_APP: web
FLASK_RUN_PORT: 4998
- name: 🔦 Run Lighthouse
run: |
npm install -g @lhci/[email protected]
lhci autorun
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
PGPASSWORD: 12345
REDIS_HOST: localhost
REDIS_PORT: 6379
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
LHCI_TOKEN: ${{ secrets.LHCI_TOKEN }}