-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (43 loc) · 1.16 KB
/
preview.yaml
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
# file: .github/workflows/preview.yaml
on:
pull_request:
branches:
- main
jobs:
preview:
runs-on: ubuntu-latest
steps:
- name: Context
uses: okteto/context@latest
with:
url: ${{secrets.OKTETO_URL}}
token: ${{ secrets.OKTETO_TOKEN }}
- name: Deploy preview environment
uses: okteto/deploy-preview@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: oktaco-pr-${{ github.event.number }}
timeout: 15m
scope: global
- name: Checkout code
uses: actions/checkout@v4
- name: Run end to end tests
uses: okteto/test@latest
with:
tests: e2e
namespace: oktaco-pr-${{ github.event.number }}
- name: Save playwright report
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: e2e/playwright-report/
retention-days: 30
- name: Save test results
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: test-results
path: e2e/test-results/
retention-days: 30