Skip to content

feat: configure Stripe API version #193

feat: configure Stripe API version

feat: configure Stripe API version #193

Workflow file for this run

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-22.04]
node: ['18', '20']
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Set up .env file
run: |
touch .env
echo DATABASE_URL='postgres://postgres:[email protected]: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: Prettier checks
run: |
npm run prettier:check
- name: ESLint checks
run: |
npm run eslint:check
- name: Builds successfully
run: |
npm run build
- name: Tests
run: |
docker-compose -f ./docker/compose.yml up -d
npm run test