Skip to content

Logo update

Logo update #315

name: medicines-web-branch
on:
pull_request:
branches:
- "master"
paths:
- medicines/web/**
- .github/workflows/medicines-web-branch.yaml
env:
AZURE_SEARCH_API_VERSION: 2017-11-11
AZURE_SEARCH_EXACTNESS_BOOST: 4
AZURE_SEARCH_INDEX: products-index
AZURE_SEARCH_KEY: EB09FBB43EBD24C1C8D5983A9C00B497
AZURE_SEARCH_SCORING_PROFILE: preferKeywords
AZURE_SEARCH_SERVICE: mhraproductsnonprod
AZURE_SEARCH_WORD_FUZZINESS: 1
GOOGLE_GTM_CONTAINER_ID: GTM-WJ5TW34
GOOGLE_TRACKING_ID: UA-6838115-11
GOOGLE_USE_DEBUG: true
ROOT_URL_DOMAIN: .windows.net
GRAPHQL_URL: https://does-not-matter/this-gets-mocked
USE_GRAPHQL: false
SHOW_BMGF: true
BMGF_AZURE_SEARCH_INDEX: bmgf-index
AZURE_STORAGE_ACCOUNT: mhraproductsnonprod
AZURE_STORAGE_KEY: ${{ secrets.PRODUCTS_STORAGE_MASTER_KEY_NONPROD }}
ENV: development
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Setup node.js
uses: actions/setup-node@v1
with:
node-version: "14.15"
- name: Install modules
working-directory: medicines/web
run: yarn install --frozen-lockfile
- name: Run tests with coverage
working-directory: medicines/web
run: yarn test:ci
- name: Build and export
working-directory: medicines/web
run: yarn build && yarn export
- name: Write variables to .env
working-directory: medicines/web
run: |
{
echo "AZURE_SEARCH_SERVICE=\"$AZURE_SEARCH_SERVICE\""
echo "AZURE_SEARCH_INDEX=\"$AZURE_SEARCH_INDEX\""
echo "AZURE_SEARCH_KEY=\"$AZURE_SEARCH_KEY\""
echo "GRAPHQL_URL=\"$GRAPHQL_URL\""
echo "GRAPHQL_URL=\"$GRAPHQL_URL\""
echo "BMGF_AZURE_SEARCH_INDEX=\"$BMGF_AZURE_SEARCH_INDEX\""
} > .env
- name: Run cypress end-to-end tests
working-directory: medicines/web
run: mkdir -p cypress/screenshots && yarn test-e2e
env:
ROOT_URL_DOMAIN: localhost
- name: Upload cypress screenshots
uses: actions/upload-artifact@v1
if: failure()
with:
name: medicines-cypress-screenshots
path: medicines/web/cypress/screenshots
- name: Upload cypress videos
uses: actions/upload-artifact@v1
if: always()
with:
name: medicines-cypress-videos
path: medicines/web/cypress/videos
- name: Accessibility check
working-directory: medicines/web
run: yarn a11y
env:
ROOT_URL_DOMAIN: localhost
- name: Upload pa11y screenshots
uses: actions/upload-artifact@v1
if: failure()
with:
name: medicines-pa11y-screenshots
path: medicines/web/pa11y-screenshots