-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (54 loc) · 1.54 KB
/
tests.yml
File metadata and controls
66 lines (54 loc) · 1.54 KB
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
name: Tests
on:
pull_request:
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare
uses: ./.github/actions/prepare
- name: Install demo dependencies
run: npm ci
working-directory: demo
- name: Install Juno CLI
run: npm i -g @junobuild/cli
- name: Cache Docker layers for default image
uses: actions/cache@v3
with:
path: /home/runner/.docker
key: ${{ runner.os }}-docker-default-${{ github.sha }}
restore-keys: |
${{ runner.os }}-docker-default-
- name: Run emulator
run: |
cd demo
set -e
juno emulator start --headless &
juno emulator wait
juno login --emulator --mode development --headless
juno config apply --mode development --headless
- name: Run default tests
run: npm run e2e:ci
- name: Upload Playwright report on failure
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 3
- name: Upload Playwright results on failure
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: test-results
path: test-results/
retention-days: 3
may-merge:
needs: ['tests']
runs-on: ubuntu-latest
steps:
- name: Cleared for merging
run: echo OK