Skip to content

chore(deps): bump the npm_and_yarn group across 1 directory with 6 updates #26

chore(deps): bump the npm_and_yarn group across 1 directory with 6 updates

chore(deps): bump the npm_and_yarn group across 1 directory with 6 updates #26

Workflow file for this run

name: E2E Tests
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
service-matrix:
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.determine-matrix.outputs.changes }}
# NOTE: only account E2E tests enabled in pipeline currently; add other services as they are updated
# IF you add a new filter it ALSO needs to be here
services: >-
["account"]
# Resolves to true if it should run everything, aka when common files change
run-all: ${{ steps.determine-matrix.outputs.changes.common }}
steps:
- name: Check Out Repo
uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: determine-matrix
with:
# Adding a filter? Check for the need to add to the outputs as well
filters: |
common:
- 'Docker/**'
- 'tools/ci-k6/**'
- '.github/**'
- 'docker-compose.yaml'
- 'docker-compose-e2e.*.yaml'
- 'libs/types'
account:
- 'apps/account-api/**'
- 'apps/account-worker/**'
- 'libs/account-lib/**'
graph:
- 'apps/graph-api/**'
- 'apps/graph-worker/**'
- 'libs/graph-lib/**'
content-publishing:
- 'apps/content-publishing-api/**'
- 'apps/content-publishing-worker/**'
- 'libs/content-publishing-lib/**'
content-watcher:
- 'apps/content-watcher/**'
- 'libs/content-watcher-lib/**'
build:
name: '[${{ matrix.service }}] E2E Tests'
runs-on: ubuntu-latest
needs: service-matrix
strategy:
fail-fast: false
matrix:
service: ${{ fromJson(needs.service-matrix.outputs.services) }}
steps:
- name: Run or Skip
id: should
run: echo "RUN=${{ needs.service-matrix.outputs.run-all || contains(fromJson(needs.service-matrix.outputs.changes), matrix.service) }}" >> "$GITHUB_OUTPUT"
- name: Checkout
if: ${{ steps.should.outputs.RUN == 'true' }}
uses: actions/checkout@v4
- name: Install Node.js
if: ${{ steps.should.outputs.RUN == 'true' }}
uses: actions/setup-node@v4
with:
node-version: 20.16.0
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
cache-dependency-path: tools/ci-k6/package-lock.json
- name: Install dependencies
if: ${{ steps.should.outputs.RUN == 'true' }}
run: npm ci
- name: Start Frequency
if: ${{ steps.should.outputs.RUN == 'true' }}
# NOTE: the 'sleep' below can be shortened or possibly eliminated once we switch from the 'dsnp/instant-seal-node-with-deployed-schemas'
# to the 'frequencychain/standalone-node' with schemas in the genesis block (after Frequency 1.13 is deployed to Mainnet & the image is updated)
run: |
docker compose -f docker-compose.yaml -f docker-compose-e2e.${{ matrix.service }}.yaml --profile e2e up -d
sleep 15
# TODO: make a service-agnostic setup script, or make service-specific setup scripts all in one place
- name: Generate Provider and Capacity
if: ${{ steps.should.outputs.RUN == 'true' }}
working-directory: apps/account-api/test/setup
run: npm ci && npm run main
- name: Run E2E Tests
if: ${{ steps.should.outputs.RUN == 'true' }}
run: npm run test:e2e:${{ matrix.service }}
- name: Stop Docker Compose
if: ${{ steps.should.outputs.RUN == 'true' || failure() }}
run: docker compose -f docker-compose.yaml -f docker-compose-e2e.${{ matrix.service }}.yaml --profile e2e down