-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (41 loc) · 1.31 KB
/
ci.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
name: CI
on: push
jobs:
ci:
name: Type Checking, Linting
runs-on: ubuntu-latest
timeout-minutes: 30
# TODO: Update environment variables with your own database credentials
env:
PGHOST: localhost
PGDATABASE: expo_example_fall_2024
PGUSERNAME: expo_example_fall_2024
PGPASSWORD: expo_example_fall_2024
steps:
- name: Start preinstalled PostgreSQL on Ubuntu
run: |
sudo systemctl start postgresql.service
pg_isready
- name: Create database user
run: |
sudo -u postgres psql --command="CREATE USER $PGUSERNAME PASSWORD '$PGPASSWORD'" --command="\du"
- name: Create database and allow user
run: |
sudo -u postgres createdb --owner=$PGUSERNAME $PGDATABASE
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run database migrations
run: pnpm migrate up
- name: Generate typedRoutes TS types
run: pnpm expo customize tsconfig.json
- name: Check TypeScript Types
run: pnpm tsc
- name: Lint with ESLint
run: pnpm eslint . --max-warnings 0