-
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (57 loc) · 1.79 KB
/
tests-on-demand.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
name: E2E On Demand
on:
workflow_dispatch:
inputs:
tags:
description: 'Test tags'
required: true
default: 'all,smoke,chrome,safari'
env:
REGISTRY: ghcr.io
jobs:
e2e:
name: 🚀 E2E
strategy:
matrix:
project: [ 'Mobile Chrome', 'Mobile Safari' ]
permissions:
packages: read
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
run: gh search repos --owner akdasa-studios --match name shlokas --visibility public | while read -r repo _; do gh repo clone "$repo" "$repo"; done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 🏗️ Build
run: (cd ./akdasa-studios/shlokas-server && ./shlokas.build.sh testing:dev)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 🎬 Start Environment
run: (cd ./akdasa-studios/shlokas-server && ./shlokas.run.sh testing:dev)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 🧪 Testing
uses: addnab/docker-run-action@v3
with:
image: shlokas-tests-e2e
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
options: |
-e CI=1
-e SHLOKAS_URL=http://shlokas
-e MAIL_URL=http://mail:1080
-v ${{ github.workspace }}/output:/e2e/output
--network shlokas
shell: bash
run: |
npm i
npx playwright test --project="${{ matrix.project }}"
- name: 🚚 [Artifacts] Upload
if: ${{ failure() }}
uses: actions/[email protected]
with:
name: e2e-${{ matrix.project }}
path: output/
retention-days: 5