Skip to content

Alloy Prod Upstreams #4

Alloy Prod Upstreams

Alloy Prod Upstreams #4

Workflow file for this run

name: Alloy Prod Upstreams
on:
workflow_dispatch:
inputs:
logLevel:
description: "Log level"
required: true
default: "warning"
edgeBasePath:
description: "Edge Base Path"
required: false
default: "ee"
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: ${{ github.event.inputs.edgeBasePath }}
jobs:
store-sauce-configs:
name: Upload sauce configs to artifact
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
env:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: sauce-config
path: .sauce
- uses: actions/upload-artifact@v4
with:
name: sauce-ignore
path: .sauceignore
alloy-prod-e2e:
name: "ee: 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@v4
with:
ref: refs/heads/${{ steps.last_release.outputs.tag_name }}
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Clear cache
uses: actions/cache@v4
id: npm-cache
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}-${{ secrets.NPM_CACHE_VERSION }}
- name: Download sauce config into tags
uses: actions/download-artifact@v4
with:
name: sauce-config
path: .sauce
- name: Remove File
uses: JesseTG/rm@v1.0.3
with:
path: .sauceignore
- uses: actions/download-artifact@v4
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@v4.3.0
env:
GITHUB_TOKEN: ${{ github.token }}
EDGE_BASE_PATH: ${{ github.event.inputs.edgeBasePath }}
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
EDGE_BASE_PATH=${{ github.event.inputs.edgeBasePath }}
config-file: ./.sauce/ee-prd.yml