Skip to content

Alloy Prod Pre-Edge #1383

Alloy Prod Pre-Edge

Alloy Prod Pre-Edge #1383

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/get-latest-release@v1.0.1
with:
myToken: ${{ github.token }}
exclude_types: "draft|prerelease"
- uses: actions/checkout@v2.3.3
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/rm@v1.0.3
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/saucectl-run-action@v3.0.1
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