feat(tests): update Alpaca API tests to include range parameters and improve stock database cleanup
Run Tests / test (push) Failing after 8s
Run Tests / test (push) Failing after 8s
- Modified Alpaca Historical Bars tests to include range parameters in API requests. - Updated test descriptions for clarity. - Added cleanup step to delete test ticker after verification in stock database tests. - Adjusted Vitest configuration to exclude test files from coverage.
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
name: Run Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
pull_request:
|
||||
branches: [main, master]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
cache: "npm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Install Playwright browsers
|
||||
run: npx playwright install --with-deps
|
||||
|
||||
- name: Run typecheck
|
||||
run: npm run typecheck
|
||||
|
||||
- name: Run unit tests
|
||||
run: npm test
|
||||
|
||||
- name: Setup database
|
||||
run: npx prisma migrate deploy --create-db || npx prisma db push
|
||||
|
||||
- name: Run E2E tests
|
||||
run: npm run test:e2e
|
||||
env:
|
||||
ALPACA_API_KEY: ${{ secrets.ALPACA_API_KEY }}
|
||||
ALPACA_SECRET_KEY: ${{ secrets.ALPACA_SECRET_KEY }}
|
||||
ALPACA_BASE_URL: ${{ secrets.ALPACA_BASE_URL }}
|
||||
ALPACA_DATA_URL: ${{ secrets.ALPACA_DATA_URL }}
|
||||
DATABASE_URL: file:./prisma/dev.db
|
||||
continue-on-error: true
|
||||
Reference in New Issue
Block a user