-
-
Notifications
You must be signed in to change notification settings - Fork 117
82 lines (72 loc) · 2.35 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
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
name: CI
on:
pull_request:
push:
branches:
- master
workflow_dispatch:
jobs:
test:
name: Test / OS ${{ matrix.platform }} / Node ${{ matrix.node }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-20.04]
node: ['18']
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: |
npm ci
- name: Prettier checks
run: |
npm run prettier:check
- name: ESLint checks
run: |
npm run eslint:check
- name: Builds successfully
run: |
npm run build
- name: Tests pass
run: |
mkdir data && chmod -R 777 data && \
npm run test:coverage
env:
ANON_KEY: ${{ secrets.ANON_KEY }}
SERVICE_KEY: ${{ secrets.SERVICE_KEY }}
TENANT_ID: ${{ secrets.TENANT_ID }}
REGION: ${{ secrets.REGION }}
POSTGREST_URL: ${{ secrets.POSTGREST_URL }}
GLOBAL_S3_BUCKET: ${{ secrets.GLOBAL_S3_BUCKET }}
PGRST_JWT_SECRET: ${{ secrets.PGRST_JWT_SECRET }}
AUTHENTICATED_KEY: ${{ secrets.AUTHENTICATED_KEY }}
DATABASE_URL: postgresql://postgres:[email protected]/postgres
PGOPTIONS: -c search_path=storage,public
FILE_SIZE_LIMIT: '52428800'
STORAGE_BACKEND: s3
MULTITENANT_DATABASE_URL: postgresql://postgres:[email protected]:5433/postgres
POSTGREST_URL_SUFFIX: /rest/v1
ADMIN_API_KEYS: apikey
ENABLE_IMAGE_TRANSFORMATION: true
IMGPROXY_URL: http://127.0.0.1:50020
AWS_ACCESS_KEY_ID: supa-storage
AWS_SECRET_ACCESS_KEY: secret1234
AWS_DEFAULT_REGION: ap-southeast-1
GLOBAL_S3_ENDPOINT: http://127.0.0.1:9000
GLOBAL_S3_PROTOCOL: http
GLOBAL_S3_FORCE_PATH_STYLE: true
- name: Upload coverage results to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}