Skip to content

Commit

Permalink
add search bar deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cea2aj committed Jan 31, 2022
1 parent 8cc2b42 commit 93ca6d8
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/acceptance_search_bar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Run acceptance tests

on:
workflow_call:
secrets:
BROWSERSTACK_USERNAME:
required: true
BROWSERSTACK_ACCESS_KEY:
required: true

jobs:
headless_acceptance:
name: Headless Acceptance
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 14
cache: 'npm'
- run: npm ci
- name: Download build-output artifact
uses: actions/download-artifact@v2
with:
name: build-output
path: dist/
- run: npx testcafe -c 3 "chrome:headless,firefox:headless" --config-file ../testcafe_search_bar.json -q
44 changes: 44 additions & 0 deletions .github/workflows/build_and_deploy_search_bar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and deploy i18n

on:
push:
tags:
-'search-bar-v*'
branches:
-'search-bar-v*' ##FOR TESTING ONLY

jobs:
call_build:
uses: ./.github/workflows/build.yml
with:
build_script: build-search-bar-only

call_misc_tests:
uses: ./.github/workflows/miscellaneous_tests.yml

call_acceptance_search_bar:
uses: ./.github/workflows/acceptance_search_bar.yml
needs: call_build
secrets:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}

extract_versions:
runs-on: ubuntu-latest
outputs:
minor_version: ${{ steps.vars.outputs.minor_version }}
major_version: ${{ steps.vars.outputs.major_version }}
steps:
- name: extract major and minor substrings
id: vars
run: |
MINOR_VERSION="$(echo "${{ github.ref_name }}##search-bar-" | cut -d '.' -f 1,2)"
echo $MINOR_VERSION
echo ::set-output name=minor_version::${MINOR_VERSION}
MAJOR_VERSION="$(echo "${{ github.ref_name }}##search-bar-" | cut -d '.' -f 1)"
echo $MAJOR_VERSION
echo ::set-output name=major_version::${MAJOR_VERSION}
concurrency:
group: ci-build-and-deploy-i18n-${{ github.ref }}-1
cancel-in-progress: true

0 comments on commit 93ca6d8

Please sign in to comment.