Skip to content

Commit

Permalink
introduce jest tests
Browse files Browse the repository at this point in the history
log more details about an error
  • Loading branch information
JackuB committed Jan 20, 2024
1 parent c4d30b4 commit e5300f6
Showing 7 changed files with 5,463 additions and 1,565 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/fly.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
name: Fly Deploy

on:
push:
branches:
- main

jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Tests

on:
push:

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
};
Loading

0 comments on commit e5300f6

Please sign in to comment.