Refactor repo #69
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: Test | |
on: | |
pull_request: | |
branches: | |
- main | |
env: | |
VITE_NEON_DB_URL: ${{ secrets.VITE_NEON_DB_URL }} | |
VITE_NEON_DB_POOLER_URL: ${{ secrets.VITE_NEON_DB_POOLER_URL }} | |
VITE_VERCEL_TOKEN: ${{ secrets.VITE_VERCEL_TOKEN }} | |
VITE_CLERK_SECRET_KEY: ${{ secrets.VITE_CLERK_SECRET_KEY }} | |
VITE_WSPROXY: ${{ vars.VITE_WSPROXY }} | |
VITE_CLERK_USER: ${{ vars.VITE_CLERK_USER }} | |
jobs: | |
test-node-old: | |
runs-on: ubuntu-latest | |
steps: | |
# setup | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- name: Install package dependencies | |
run: | | |
# strip Prisma, whose preinstall script throws on Node versions less than 18.x | |
sudo apt-get install jq && \ | |
mv package.json package.json.old && \ | |
jq 'del(.devDependencies.prisma, .devDependencies."@prisma/client")' package.json.old > package.json | |
npm install | |
# goal | |
- name: Using vitest@2, run CLI-based tests in Node 16 | |
run: npx vitest@2 run --dir=tests/cli --environment=node --no-file-parallelism | |
test-node-lts: | |
runs-on: ubuntu-latest | |
steps: | |
# setup | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install package dependencies | |
run: npm install | |
# goal | |
- name: Run all tests in Node LTS | |
run: npm run test |