Merge pull request #132 from supabase/separate-stripe-renovate #287
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: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: Test / OS ${{ matrix.platform }} / Node ${{ matrix.node }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [ubuntu-24.04] | |
| node: ['22'] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Set up .env file | |
| run: | | |
| touch .env | |
| echo DATABASE_URL='postgres://postgres:postgres@127.0.0.1:55432/postgres?sslmode=disable&search_path=stripe' >> .env | |
| echo NODE_ENV=dev >> .env | |
| echo STRIPE_SECRET_KEY=sk_test_ >> .env | |
| echo STRIPE_WEBHOOK_SECRET=whsec_ >> .env | |
| echo SCHEMA=stripe >> .env | |
| echo PORT=8080 >> .env | |
| echo API_KEY=api_key_test >> .env | |
| - name: Install dependencies | |
| run: | | |
| npm ci | |
| - name: Formatting checks | |
| run: | | |
| npm run format:check | |
| - name: Lint | |
| run: | | |
| npm run lint | |
| - name: Builds successfully | |
| run: | | |
| npm run build | |
| - name: Tests | |
| run: | | |
| docker compose -f ./docker/compose.yml up -d | |
| npm run test |