feat: support tax ids (#108) #242
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: 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: ['20'] | |
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:[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 |