forked from IntersectMBO/plutus-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 1.91 KB
/
plutus-playground-e2e-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
name: Plutus Playground E2E Tests
on:
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
jobs:
plutus-playground-e2e-tests:
runs-on: ubuntu-20.04
steps:
- name: Checkout Plutus
uses: actions/checkout@v3
- name: Setup Haskell
uses: haskell/actions/setup@v2
with:
ghc-version: '8.10.4'
cabal-version: '3.2.0.0'
- name: Setup Nix
uses: cachix/install-nix-action@v17
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
substituters = https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
- name: Build Plutus Playground
run: nix-build -A plutus-playground.client -A plutus-playground.server
- name: Run Plutus Playground
working-directory: ./plutus-playground-client
env:
CLIENT_PORT: 8009
run: |
nix-shell --run 'plutus-playground-server' ../shell.nix &
nix-shell --run 'npm start' ../shell.nix &
while ! echo exit | nc localhost $CLIENT_PORT; do echo "Waiting for playground client on $CLIENT_PORT" && sleep 10; done
- name: Setup NodeJs
uses: actions/setup-node@v3
with:
node-version: '12.12.0'
- name: Setup Playwright
working-directory: ./plutus-playground-client/e2e-tests/
run: |
npm install -D @playwright/test
npx playwright install
- name: Run Tests
working-directory: ./plutus-playground-client/e2e-tests/
run: |
npx playwright test
- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
name: html-report
path: plutus-playground-client/e2e-tests/html-report/index.html
retention-days: 5