Skip to content

Tests

Tests #636

Workflow file for this run

name: Tests
on:
pull_request:
schedule:
- cron: "0 0 * * *" # daily
jobs:
build:
runs-on: ubuntu-latest
name: Build
steps:
- name: Setup repo
uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Verify formatting
run: pnpm fmt
- name: Start redis server
uses: ./.github/actions/redis
with:
UPSTASH_REDIS_REST_URL: http://127.0.0.1:6379
UPSTASH_REDIS_REST_TOKEN: ${{ secrets.UPSTASH_REDIS_REST_TOKEN }}
UPSTASH_REPO_ACCESS_TOKEN: ${{ secrets.UPSTASH_REPO_ACCESS_TOKEN }}
REDIS_SERVER_CONFIG: ${{ secrets.REDIS_SERVER_CONFIG }}
- name: Build
run: pnpm build
env:
UPSTASH_REDIS_REST_URL: http://127.0.0.1:6379
UPSTASH_REDIS_REST_TOKEN: ${{ secrets.UPSTASH_REDIS_REST_TOKEN }}
test:
runs-on: ubuntu-latest
name: Tests
steps:
- name: Setup repo
uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Start redis server
uses: ./.github/actions/redis
with:
UPSTASH_REDIS_REST_URL: http://127.0.0.1:6379
UPSTASH_REDIS_REST_TOKEN: ${{ secrets.UPSTASH_REDIS_REST_TOKEN }}
UPSTASH_REPO_ACCESS_TOKEN: ${{ secrets.UPSTASH_REPO_ACCESS_TOKEN }}
REDIS_SERVER_CONFIG: ${{ secrets.REDIS_SERVER_CONFIG }}
- name: Run tests
run: pnpm test
env:
UPSTASH_REDIS_REST_URL: http://127.0.0.1:6379
UPSTASH_REDIS_REST_TOKEN: ${{ secrets.UPSTASH_REDIS_REST_TOKEN }}
EU2_UPSTASH_REDIS_REST_URL: ${{ secrets.EU2_UPSTASH_REDIS_REST_URL }}
EU2_UPSTASH_REDIS_REST_TOKEN: ${{ secrets.EU2_UPSTASH_REDIS_REST_TOKEN }}
APN_UPSTASH_REDIS_REST_URL: ${{ secrets.APN_UPSTASH_REDIS_REST_URL }}
APN_UPSTASH_REDIS_REST_TOKEN: ${{ secrets.APN_UPSTASH_REDIS_REST_TOKEN }}
US1_UPSTASH_REDIS_REST_URL: ${{ secrets.US1_UPSTASH_REDIS_REST_URL }}
US1_UPSTASH_REDIS_REST_TOKEN: ${{ secrets.US1_UPSTASH_REDIS_REST_TOKEN }}