Skip to content

Update dependency graphql to v16.8.1 [SECURITY] #455

Update dependency graphql to v16.8.1 [SECURITY]

Update dependency graphql to v16.8.1 [SECURITY] #455

Workflow file for this run

# https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main
- bump
env:
cache-version: v20200524
YARN_CACHE: 'true'
jobs:
yarn-install:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
node-version:
- 14.x
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
lfs: true
if: env.YARN_CACHE == 'true'
- uses: actions/setup-node@v2
if: env.YARN_CACHE == 'true'
with:
node-version: ${{ matrix.node-version }}
- name: Yarn offline cache
uses: actions/cache@v2
id: yarn-offline-cache
if: env.YARN_CACHE == 'true'
with:
path: ~/yarn-offline-cache
key: ${{ env.cache-version }}-yarn-${{ matrix.os }}-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ env.cache-version }}-yarn-${{ matrix.os }}-${{ matrix.node-version }}-
- name: Install packages
if: env.YARN_CACHE == 'true'
run: |
yarn config set yarn-offline-mirror ./yarn-offline-cache
yarn config set yarn-offline-mirror-pruning true
yarn install --frozen-lockfile --prefer-offline
- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache
uses: actions/cache@v2
id: lfs-cache
with:
path: .git/lfs
key: ${{ matrix.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1
restore-keys: |
${{ matrix.os }}-lfs-
- name: Git LFS Pull
run: git lfs pull
storybook-works:
needs: yarn-install
if: 'false' # disable this action, because storybook works as expected, but smoke-test does not
strategy:
matrix:
os:
- ubuntu-latest
node-version:
- 14.x
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Yarn offline cache
uses: actions/cache@v2
id: yarn-offline-cache
if: env.YARN_CACHE == 'true'
with:
path: ~/yarn-offline-cache
key: ${{ env.cache-version }}-yarn-${{ matrix.os }}-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ env.cache-version }}-yarn-${{ matrix.os }}-${{ matrix.node-version }}-
- name: Install packages
run: |
yarn config set yarn-offline-mirror ./yarn-offline-cache
yarn config set yarn-offline-mirror-pruning true
yarn install --frozen-lockfile --prefer-offline
- run: yarn storybook --smoke-test
continue-on-error: false
lint:
needs: yarn-install
strategy:
matrix:
os:
- ubuntu-latest
node-version:
- 14.x
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Yarn offline cache
uses: actions/cache@v2
id: yarn-offline-cache
if: env.YARN_CACHE == 'true'
with:
path: ~/yarn-offline-cache
key: ${{ env.cache-version }}-yarn-${{ matrix.os }}-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ env.cache-version }}-yarn-${{ matrix.os }}-${{ matrix.node-version }}-
- name: Install packages
run: |
yarn config set yarn-offline-mirror ./yarn-offline-cache
yarn config set yarn-offline-mirror-pruning true
yarn install --frozen-lockfile --prefer-offline
- run: yarn lint
continue-on-error: false
unit-test:
needs: yarn-install
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
node-version:
- 14.x
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Yarn offline cache
uses: actions/cache@v2
id: yarn-offline-cache
if: env.YARN_CACHE == 'true'
with:
path: ~/yarn-offline-cache
key: ${{ env.cache-version }}-yarn-${{ matrix.os }}-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ env.cache-version }}-yarn-${{ matrix.os }}-${{ matrix.node-version }}-
- name: Install packages
run: |
yarn config set yarn-offline-mirror ./yarn-offline-cache
yarn config set yarn-offline-mirror-pruning true
yarn install --frozen-lockfile --prefer-offline
- name: Run unit tests
run: yarn test:unit
- name: Cache jest coverage
uses: actions/cache@v2
id: jest-coverage
with:
path: jest-coverage
key: ${{ matrix.os }}-jest-coverage-${{ github.sha }}
restore-keys: |
${{ matrix.os }}-jest-coverage-
e2e-test:
needs: yarn-install
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
node-version:
- 14.x
browser:
- chrome
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
lfs: true
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Yarn offline cache
uses: actions/cache@v2
id: yarn-offline-cache
if: env.YARN_CACHE == 'true'
with:
path: ~/yarn-offline-cache
key: ${{ env.cache-version }}-yarn-${{ matrix.os }}-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ env.cache-version }}-yarn-${{ matrix.os }}-${{ matrix.node-version }}-
- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache
uses: actions/cache@v2
id: lfs-cache
with:
path: .git/lfs
key: ${{ matrix.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1
restore-keys: |
${{ matrix.os }}-lfs-
- name: Git LFS Pull
run: git lfs pull
- name: Install packages
run: |
yarn config set yarn-offline-mirror ./yarn-offline-cache
yarn config set yarn-offline-mirror-pruning true
yarn install --frozen-lockfile --prefer-offline
- run: yarn build
- name: Run Cypress tests
env:
GITHUB_CLIENT_ID: ${{ secrets.MY_GITHUB_CLIENT_ID }}
GITHUB_CLIENT_SECRET: ${{ secrets.MY_GITHUB_CLIENT_SECRET }}
CYPRESS_COOKIE_NAME: ${{ secrets.CYPRESS_COOKIE_NAME }}
CYPRESS_GITHUB_PW: ${{ secrets.CYPRESS_GITHUB_PW }}
CYPRESS_GITHUB_USER: ${{ secrets.CYPRESS_GITHUB_USER }}
CYPRESS_SITE_NAME: ${{ secrets.CYPRESS_SITE_NAME }}
run: |
yarn cypress info
yarn start-test start 3001 "cypress run"
- name: Cache cypress coverage
uses: actions/cache@v2
id: cypress-coverage
with:
path: cypress-coverage
key: ${{ matrix.os }}-cypress-coverage-${{ github.sha }}
restore-keys: |
${{ matrix.os }}-cypress-coverage-
- name: Upload snapshots
uses: actions/upload-artifact@v2
with:
name: snapshots-${{ matrix.os }}-${{ matrix.browser }}
path: tests/e2e/snapshots
code-coverage:
needs:
- yarn-install
- unit-test
- e2e-test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
node-version:
- 14.x
env:
OS: ${{ matrix.os }}
NODE: ${{ matrix.node_version }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Yarn offline cache
uses: actions/cache@v2
id: yarn-offline-cache
if: env.YARN_CACHE == 'true'
with:
path: ~/yarn-offline-cache
key: ${{ env.cache-version }}-yarn-${{ matrix.os }}-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ env.cache-version }}-yarn-${{ matrix.os }}-${{ matrix.node-version }}-
- name: Install packages
if: env.YARN_CACHE == 'true'
run: |
yarn config set yarn-offline-mirror ./yarn-offline-cache
yarn config set yarn-offline-mirror-pruning true
yarn install --frozen-lockfile --prefer-offline
- name: Restore jest coverage cache
uses: actions/cache@v2
id: jest-coverage
with:
path: jest-coverage
key: ${{ matrix.os }}-jest-coverage-${{ github.sha }}
restore-keys: |
${{ matrix.os }}-jest-coverage-
- name: Restore cypress coverage cache
uses: actions/cache@v2
id: cypress-coverage
with:
path: cypress-coverage
key: ${{ matrix.os }}-cypress-coverage-${{ github.sha }}
restore-keys: |
${{ matrix.os }}-cypress-coverage-
- name: Create combined coverage report
run: yarn report:combined
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/
flags: tests
env_vars: OS,NODE
name: codecov-garbage
fail_ci_if_error: true
path_to_write_report: ./coverage/codecov_report.txt
verbose: false
lighthouse-test:
needs: yarn-install
if: 'false' # disable this action, because we should do it like here: https://github.com/treosh/lighthouse-ci-action at "Integrate Lighthouse CI with Netlify"
strategy:
matrix:
os:
- ubuntu-latest
node-version:
- 14.x
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Yarn offline cache
uses: actions/cache@v2
id: yarn-offline-cache
if: env.YARN_CACHE == 'true'
with:
path: ~/yarn-offline-cache
key: ${{ env.cache-version }}-yarn-${{ matrix.os }}-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ env.cache-version }}-yarn-${{ matrix.os }}-${{ matrix.node-version }}-
- name: Install packages
run: |
yarn config set yarn-offline-mirror ./yarn-offline-cache
yarn config set yarn-offline-mirror-pruning true
yarn install --frozen-lockfile --prefer-offline
- run: yarn build
- uses: treosh/lighthouse-ci-action@v8
with:
uploadArtifacts: true
temporaryPublicStorage: false
configPath: './lighthouserc.json'