Skip to content

chore(deps): update testing dependencies (major) #3814

chore(deps): update testing dependencies (major)

chore(deps): update testing dependencies (major) #3814

Workflow file for this run

name: Web App Tests
on:
pull_request:
branches: [master]
paths:
- 'client/web/**'
env:
cwd: client/web/emberclear
name: emberclear
##############################################################
jobs:
tests:
name: Tests
strategy:
matrix:
# os: [ubuntu-latest, macOS-latest, windows-latest]
# browsers: [chrome, firefox, safari, edge]
ci_browser:
- Chrome
# Firefox is flaky in Github........
# - Firefox
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install
working-directory: ${{ env.cwd }}
run: yarn install
- name: Test
working-directory: ${{ env.cwd }}
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
CI_BROWSER: ${{ matrix.ci_browser }}
# run: ./scripts/test-with-coverage.sh
run: yarn ember test
# Coverage Disabled while these are worked out:
# https://github.com/babel/ember-cli-babel/issues/350
# https://github.com/kategengler/ember-cli-code-coverage/issues/265
#
# - name: Upload Coverage to Coveralls
# uses: coverallsapp/[email protected]
# with:
# github-token: ${{ secrets.github_token }}
# path-to-lcov: ./client/web/emberclear/coverage/lcov.info
# - name: Upload Coverage Artifacts
# uses: actions/upload-artifact@v1
# with:
# name: coverage
# path: client/web/emberclear/coverage/
##############################################################
#
bundle_analysis:
name: Bundle Analysis
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install
working-directory: ${{ env.cwd }}
run: yarn install
- name: Analyze Bundle
working-directory: ${{ env.cwd }}
run: yarn analyze
- name: Upload Bundle Analysis Artifacts
uses: actions/upload-artifact@v2
with:
name: built_bundle_analysis
path: client/web/emberclear/public/bundle
build_app:
name: Build App
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install and Build
run: |
( cd client/web/emberclear && yarn install && yarn build:production )
cp ${{ env.cwd }}/config/netlify/_redirects ${{ env.cwd }}/dist
- name: Upload App Artifacts
uses: actions/upload-artifact@v2
with:
name: built_app
path: client/web/emberclear/dist/
##############################################################
tests_e2e:
name: E2E Tests
runs-on: ubuntu-latest
timeout-minutes: 15
needs: [deploy_preview]
steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- name: Get Deploy URL
uses: actions/download-artifact@master
with:
name: deploy-url
path: ./
- name: Test
run: |
export DEPLOY_URL=$(cat ./deploy-url.txt)
cd client/web/smoke-tests
DETECT_CHROMEDRIVER_VERSION=true yarn
yarn test --target pull-request --headless
##############################################################
deploy_preview:
name: Deploy Preview
runs-on: ubuntu-latest
timeout-minutes: 15
needs: [bundle_analysis, build_app]
steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- name: Download Built Bundle Analysis Artifacts
uses: actions/download-artifact@master
with:
name: built_bundle_analysis
path: ./deploy/bundle-analysis/
- name: Download Built App Artifacts
uses: actions/download-artifact@master
with:
name: built_app
path: ./deploy/app/
- name: Combine Bundle Analysis with App
run: |
mkdir -p ./deploy/dist/bundle/
mv ./deploy/app/* ./deploy/dist/
cp ./deploy/bundle-analysis/* ./deploy/dist/bundle/
cp ${{ env.cwd }}/config/netlify/_redirects ./deploy/dist/
- name: Deploy to Netlify
id: deploy
uses: nwtgck/[email protected]
with:
publish-dir: './deploy/dist'
production-branch: __handled_separately__
github-token: ${{ secrets.GITHUB_TOKEN }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_ACCESS_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
- run: echo "${{ steps.deploy.outputs.deploy-url }}" > deploy-url.txt
- name: Upload URL as Artifact
uses: actions/upload-artifact@v2
with:
name: deploy-url
path: deploy-url.txt
##############################################################
lhci:
name: Lighthouse CI
runs-on: ubuntu-latest
needs: [build_app]
steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- name: Download Built App Artifacts
uses: actions/download-artifact@master
with:
name: built_app
path: client/web/emberclear/dist/
- name: run Lighthouse
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
run: |
volta install node
volta install @lhci/[email protected]
cd client/web/emberclear
lhci collect \
--upload.target=temporary-public-storage \
--staticDistDir=./dist \
--githubToken $GITHUB_TOKEN \
--githubAppToken $LHCI_GITHUB_APP_TOKEN