-
Notifications
You must be signed in to change notification settings - Fork 22
67 lines (65 loc) · 1.7 KB
/
tests.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
name: Tests
on:
pull_request:
push:
# trying and staging branches are for BORS config
branches:
- trying
- staging
- main
jobs:
linter_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18.19
- name: Install dependencies
run: yarn --dev
- name: Run style check
run: yarn lint
cypress-run:
runs-on: ubuntu-latest
container:
image: cypress/browsers:node16.14.2-slim-chrome100-ff99-edge
options: --user 1001
services:
meilisearch:
image: getmeili/meilisearch:v1.0.1
env:
MEILI_MASTER_KEY: "masterKey"
MEILI_NO_ANALYTICS: "true"
ports:
- "7700:7700"
steps:
- uses: actions/checkout@v3
- name: Setup node and cache
uses: actions/setup-node@v4
with:
node-version: 18.19
cache: "yarn"
cache-dependency-path: yarn.lock
- name: Install dependencies
run: yarn
- name: Browser tests
uses: cypress-io/github-action@v4
env:
CYPRESS_MEILISEARCH_HOST: http://meilisearch:7700
CYPRESS_MEILISEARCH_API_KEY: "masterKey"
with:
start: yarn ci:dev
wait-on: "http://localhost:3000"
command: yarn cy:run
config-file: cypress.config.js
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-videos
path: cypress/videos