-
Notifications
You must be signed in to change notification settings - Fork 116
59 lines (58 loc) · 1.77 KB
/
build-and-lint-front.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
name: Lint & Build & Test (front)
on:
push:
paths:
- types/**
- sdks/js/**
- front/**
- .github/workflows/build-and-lint-front.yml
permissions:
contents: read
actions: read
checks: write
jobs:
all-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20.13.0
cache: "npm"
cache-dependency-path: |
./front/package-lock.json
./types/package-lock.json
./sdks/js/package-lock.json
- name: Build Types
working-directory: types
run: npm install && npm run build
- name: Build SDK/JS
working-directory: sdks/js
run: npm install && npm run build
- name: Typecheck and Lint
working-directory: front
run: npm install && npm run tsc && npm run lint && npm run format:check && npm run docs:check
- name: Install Postgres
uses: dust-tt/postgresql-action@6730e69fe23f4f2989c19edf9e6e0d7ffeb0a05c
with:
postgresql docker image: mirror.gcr.io/postgres
postgresql version: "14.13"
postgresql db: front_test
postgresql user: test
postgresql password: test
postgresql port: 5433
- name: Run Tests
working-directory: front
env:
FRONT_DATABASE_URI: "postgres://test:test@localhost:5433/front_test"
NODE_ENV: test
run: npx tsx admin/db.ts && npm run test:ci
- name: Build Tests Report
if: always()
uses: mikepenz/action-junit-report@v5
with:
report_paths: "**/front/junit*.xml"
detailed_summary: true
flaky_summary: true
group_suite: true
check_name: Tests Report