Merge pull request #48 from ANCIENTINSANE/dev #193
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Set environment variables for tests | |
| run: | | |
| echo "BILLING_CURRENCY=USD" >> $GITHUB_ENV | |
| echo "BYOB_ENCRYPTION_SECRET=test_secret_32_characters_long_123" >> $GITHUB_ENV | |
| echo "NEXT_PUBLIC_APPWRITE_BYOB_TENANTS_ID=byob_tenants" >> $GITHUB_ENV | |
| echo "NEXT_PUBLIC_ORG_TRIAL_CREDIT_USD=30" >> $GITHUB_ENV | |
| echo "ORG_TRIAL_CREDIT_DAYS=60" >> $GITHUB_ENV | |
| echo "NEXT_PUBLIC_PERSONAL_TRIAL_CREDIT_USD=10" >> $GITHUB_ENV | |
| echo "PERSONAL_TRIAL_CREDIT_DAYS=30" >> $GITHUB_ENV | |
| - name: Type check | |
| run: npx tsc --noEmit | |
| - name: Build | |
| run: npm run build | |
| - name: Run all tests | |
| run: npx vitest run | |
| - name: Run wallet & currency tests | |
| run: npx vitest run --reporter=verbose src/features/wallet src/lib/currency |