-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (58 loc) · 1.95 KB
/
test.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
name: Test Workflow
on:
workflow_dispatch:
push:
jobs:
test-and-benchmark:
name: Test and Benchmark
runs-on: ubuntu-latest
timeout-minutes: 30
env:
LOGGER_LEVEL: error
steps:
- name: Git - Checkout
uses: actions/checkout@v4
- name: Node - Setup
uses: actions/setup-node@v4
with:
node-version: 20
- name: Prepare environment variables
run: cp -f .env.local.example .env.local
- name: Docker compose - Build & start the containers
run: docker compose --file ./docker/compose.yaml up -d
- name: pnpm - Setup
uses: pnpm/action-setup@v2
with:
run_install: false
# TODO: not working with cypress at the moment
# - name: pnpm - Store path
# shell: bash
# run: |
# echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
# - name: pnpm - Setup Cache
# uses: actions/cache@v3
# with:
# path: ${{ env.STORE_PATH }}
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-pnpm-store-
# We need this hack-y workaround to make sure the postinstall script is run correctly.
# Tried disabling post-install scripts, but that causes another issue down the line.
- name: pnpm - Workaround
run: |
pnpm add -g opencollective
- name: pnpm - Install
run: pnpm install
- name: pnpm - Lint
run: pnpm lint
- name: pnpm - Format Check
run: pnpm format:check
- name: pnpm - Build
run: pnpm build
- name: pnpm - CLI - Database Reload
run: pnpm cli database:reload
- name: pnpm - Test
run: pnpm test
# Disabled temporarily again, as for some reason it gets stuck here on GitHub actions.
# - name: pnpm - E2E
# run: pnpm e2e