Skip to content

fix(deps): update all dependencies #1880

fix(deps): update all dependencies

fix(deps): update all dependencies #1880

Workflow file for this run

name: Main workflow
# The event triggers are configured as following:
# - on any pull request, trigger the workflow
# This is to avoid running the workflow twice on pull requests.
on:
pull_request:
jobs:
test_and_build:
runs-on: ubuntu-latest
# https://github.com/bahmutov/cypress-gh-action-split-install/blob/ca3916d4e7240ebdc337825d2d78eb354855464b/.github/workflows/tests.yml#L8-L11
env:
# prevents extra Cypress installation progress messages
CI: 1
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4.0.0
id: pnpm-install
with:
run_install: false
- name: Setup Node (uses version in .nvmrc)
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
env:
# https://github.com/bahmutov/cypress-gh-action-split-install/blob/ca3916d4e7240ebdc337825d2d78eb354855464b/.github/workflows/tests.yml#L14-L18
# https://github.com/marketplace/actions/cypress-io#custom-install
CYPRESS_INSTALL_BINARY: 0
- name: Building application
run: pnpm build
env:
APPLICATION_ID: ${{ secrets.APPLICATION_ID }}
APPLICATION_URL: https://graphql-explorer-commercetools-staging.surge.sh
HOST_GCP_STAGING: ${{ secrets.HOST_GCP_STAGING }}
CTP_INITIAL_PROJECT_KEY: ${{ secrets. CYPRESS_PROJECT_KEY }}
- name: Running linters and tests
run: pnpm jest --projects jest.{eslint,test}.config.js
env:
CI: true
# https://github.com/bahmutov/cypress-gh-action-split-install/blob/ca3916d4e7240ebdc337825d2d78eb354855464b/.github/workflows/tests.yml#L23-L30
# https://github.com/marketplace/actions/cypress-io#custom-install
- name: Restoring Cypress cache
# restore / cache the binary ourselves on Linux
# see https://github.com/actions/cache
id: cache-cypress
uses: actions/cache@v3
with:
path: ~/.cache/Cypress
key: ${{ runner.os }}-cypress-${{ hashFiles('**/package.json') }}
- name: Installing Cypress binary
run: pnpm cypress install && pnpm cypress cache list
- name: Running End-to-End tests
run: pnpm start-server-and-test 'pnpm start:prod:local' http-get://127.0.0.1:3001 'pnpm test:e2e'
env:
NODE_ENV: test
CYPRESS_CI: "true"
CYPRESS_LOGIN_USER: ${{ secrets.CYPRESS_LOGIN_USER }}
CYPRESS_LOGIN_PASSWORD: ${{ secrets.CYPRESS_LOGIN_PASSWORD }}
CYPRESS_PROJECT_KEY: ${{ secrets.CYPRESS_PROJECT_KEY }}
APPLICATION_ID: ${{ secrets.APPLICATION_ID }}
APPLICATION_URL: https://graphql-explorer-commercetools-staging.surge.sh
HOST_GCP_STAGING: ${{ secrets.HOST_GCP_STAGING }}
CTP_INITIAL_PROJECT_KEY: ${{ secrets. CYPRESS_PROJECT_KEY }}