inject middleware instead of using router #55
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
workflow_call: | |
push: | |
branches: [main] | |
paths: | |
- ".github/**" | |
- "data/**" | |
- "packages/**" | |
- "playgrounds/**" | |
- "shared/**" | |
pull_request: | |
branches: [main] | |
paths: | |
- ".github/**" | |
- "data/**" | |
- "packages/**" | |
- "playgrounds/**" | |
- "shared/**" | |
jobs: | |
linters: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 18.x | |
# cache node_modules | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
id: yarn-cache | |
with: | |
path: | | |
**/node_modules | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
# install dependencies if the cache did not hit | |
- name: Install dependencies | |
if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: yarn --frozen-lockfile | |
- run: yarn test:lint | |
e2e_memory: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 18.x | |
# cache node_modules | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
id: yarn-cache | |
with: | |
path: | | |
**/node_modules | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
# install dependencies if the cache did not hit | |
- name: Install dependencies | |
if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: yarn --frozen-lockfile | |
- run: yarn postinstall:memory | |
- name: Run Memory e2e tests | |
working-directory: playgrounds/memory | |
run: yarn test:e2e | |
e2e_redis: | |
runs-on: ubuntu-latest | |
services: | |
redis: | |
image: bitnami/redis:latest | |
env: | |
ALLOW_EMPTY_PASSWORD: yes | |
ports: | |
# Opens tcp port 6379 on the host and service container | |
- 6379:6379 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 18.x | |
# cache node_modules | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
id: yarn-cache | |
with: | |
path: | | |
**/node_modules | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
# install dependencies if the cache did not hit | |
- name: Install dependencies | |
if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: yarn --frozen-lockfile | |
- run: yarn postinstall:redis | |
- name: Run Redis e2e tests | |
working-directory: playgrounds/redis | |
run: yarn test:e2e |