Skip to content

chore(deps): update monorepo:eslint #1218

chore(deps): update monorepo:eslint

chore(deps): update monorepo:eslint #1218

Workflow file for this run

name: CI
on: [push]
env:
CI: true
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_S3_STATE_BUCKET: ${{ secrets.AWS_S3_STATE_BUCKET }}
PR_NAME: master
jobs:
unit_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: install, lint and unit test
run: |
yarn install --frozen-lockfile
yarn lint
yarn test:unit -- --coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
e2e_tests:
runs-on: ubuntu-latest
env:
ARTIFACTS_PATH: artifacts/
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
run: |
yarn install --frozen-lockfile
- name: build application
run: yarn build
- name: start application
run: |
mkdir -p $ARTIFACTS_PATH
yarn start 2>&1 | tee $ARTIFACTS_PATH/serve.log &
node_modules/wait-on/bin/wait-on http-get://localhost:3000 --timeout 60000
- name: test:e2e
run: |
mkdir -p $ARTIFACTS_PATH/screenshots
mkdir -p $ARTIFACTS_PATH/videos
xvfb-run --server-args="-screen 0 1280x720x24" yarn test:e2e
- uses: actions/upload-artifact@v2
if: failure()
with:
name: artifacts
path: artifacts
deploy:
runs-on: ubuntu-latest
needs: [unit_tests, e2e_tests]
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Install packages
run: yarn install --frozen-lockfile
- name: Deploy
run: |
aws s3 sync s3://$AWS_S3_STATE_BUCKET/$PR_NAME/.serverless .serverless --delete
npx serverless
aws s3 sync .serverless s3://$AWS_S3_STATE_BUCKET/$PR_NAME/.serverless --delete