-
-
Notifications
You must be signed in to change notification settings - Fork 641
51 lines (49 loc) · 1.52 KB
/
main.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
name: Build and Test
on:
workflow_dispatch:
push:
branches:
- master # Add also master-4 when dexie@4 is stable and master will represent dexie@5. dexie@3 has its own workflow.
pull_request:
types: [opened, synchronize, reopened]
env:
LAMBDATEST: "true"
GH_ACTIONS: "true"
LT_USERNAME: ${{ secrets.LT_USERNAME }}
LT_ACCESS_KEY: ${{ secrets.LT_ACCESS_KEY }}
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
TF:
- test
- addons/Dexie.Observable/test
- addons/Dexie.Syncable/test
- addons/dexie-export-import/test
- libs/dexie-react-hooks/test
fail-fast: true # If one test fails, abort the rest of the tests
max-parallel: 5 # At least for browserstack, this seems to be needed to avoid timeouts
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 9
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Build
run: pnpm run build
- name: Set LT_TUNNEL_NAME
run: echo "LT_TUNNEL_NAME=${{ matrix.TF }}-${{ github.run_id }}-${{ github.run_attempt }}" >> $GITHUB_ENV
- name: Run headless test
uses: coactions/setup-xvfb@v1
with:
run: bash ./gh-actions.sh
working-directory: ${{ matrix.TF }}