Skip to content

Commit d625ef2

Browse files
authored
Add pgRITA check (#190)
* Add pgRITA check * Use separate workflow for pgRITA * There can never be too much postgres * Use localhost connection * Needs proper setup for roles
1 parent 14507bc commit d625ef2

2 files changed

Lines changed: 49 additions & 1 deletion

File tree

.github/workflows/pgrita.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: pgRITA
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
services:
10+
postgres:
11+
image: postgres:11.6
12+
env:
13+
POSTGRES_USER: postgres
14+
POSTGRES_PASSWORD: postgres
15+
POSTGRES_DB: postgres
16+
ports:
17+
- "0.0.0.0:5432:5432"
18+
# needed because the postgres container does not provide a healthcheck
19+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v1
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
- name: Setup DB
29+
run: |
30+
cp .env.ci .env
31+
yarn --frozen-lockfile
32+
CONFIRM_DROP=1 yarn setup
33+
- name: "Run pgRITA checks"
34+
uses: pgrita/action@main
35+
env:
36+
DATABASE_URL: postgres://postgres:postgres@localhost/graphile_starter
37+
PGRITA_TOKEN: ${{ secrets.PGRITA_TOKEN }}
38+
with:
39+
project: graphile/graphile-starter
40+
pass-on-no-token: true

package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@
8989
},
9090
"prettier": {
9191
"trailingComma": "es5",
92-
"proseWrap": "always"
92+
"proseWrap": "always",
93+
"overrides": [
94+
{
95+
"files": ["*.yml", "*.yaml"],
96+
"options": {
97+
"printWidth": 120
98+
}
99+
}
100+
]
93101
}
94102
}

0 commit comments

Comments
 (0)