-
Notifications
You must be signed in to change notification settings - Fork 48
97 lines (84 loc) · 2.59 KB
/
pre-edge-deploy.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Alloy Prod Pre-Edge
on:
workflow_dispatch:
inputs:
logLevel:
description: "Log level"
required: true
default: "warning"
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
SAUCE_CAPABILITIES_OVERRIDES_PATH: "sauceLabsCapabilities.json"
ALLOY_ENV: prod
EDGE_BASE_PATH: ee-pre-prd
jobs:
store-sauce-configs:
name: Upload sauce configs to artifact
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
env:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v3
with:
name: sauce-config
path: .sauce
- uses: actions/upload-artifact@v3
with:
name: sauce-ignore
path: .sauceignore
alloy-prod-e2e:
name: "Pre Edge: Prod E2E Tests"
runs-on: ubuntu-latest
needs: store-sauce-configs
timeout-minutes: 60
steps:
- name: "Get latest Alloy Release"
id: last_release
uses: InsonusK/[email protected]
with:
myToken: ${{ github.token }}
exclude_types: "draft|prerelease"
- uses: actions/[email protected]
with:
ref: refs/heads/${{ steps.last_release.outputs.tag_name }}
- name: Download sauce config into tags
uses: actions/download-artifact@v3
with:
name: sauce-config
path: .sauce
- name: Remove File
uses: JesseTG/[email protected]
with:
path: .sauceignore
- uses: actions/download-artifact@v3
with:
name: sauce-ignore
path: .
- name: Store Alloy version into env
uses: nyaa8/package-version@v1
- name: NPM Install
run: npm install
- name: Install dependencies
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Build
run: npm run test:functional:build:prod
env:
ALLOY_PROD_VERSION: ${{ env.PACKAGE_VERSION }}
- uses: saucelabs/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
sauce-username: ${{ secrets.SAUCE_USERNAME }}
sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }}
env: |
SAUCE_USERNAME=${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY=${{ secrets.SAUCE_ACCESS_KEY }}
ALLOY_PROD_VERSION=${{ env.PACKAGE_VERSION }}
NPM_PACKAGE_VERSION=${{ env.PACKAGE_VERSION }}
ALLOY_ENV=prod
config-file: ./.sauce/pre-edge-deploy.yml