Skip to content

Commit

Permalink
backend gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
mat1asm committed Mar 20, 2024
1 parent 30deadc commit 365dbe7
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Backend Tests
on:
pull_request:
paths: [backend/**]
push:
branches: [main]
paths: [backend/**]

jobs:
test:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./backend

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache-dependency-path: backend/yarn.lock
- name: Install deps
run: yarn install --frozen-lockfile
- name: Prettier check
run: yarn prettier:check
- name: Lint
run: yarn lint
- name: Build
run: yarn build
- name: Test
run: yarn test
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
frontend/claim_sdk/idl/token_dispenser.ts
frontend/claim_sdk/idl/token_dispenser.json
backend
1 change: 1 addition & 0 deletions backend/.swcrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"minify": false,
"jsc": {
"target": "es2016",
"parser": {
"syntax": "typescript",
"preserveAllComments": false
Expand Down
1 change: 1 addition & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build": "rm -rf dist && swc ./src -d ./dist --copy-files --ignore \"**/*.test.ts\"",
"lint": "eslint \"src/**/*.{json,js,jsx,ts,tsx}\" && tsc --noemit",
"prettier": "prettier \"src/**/*.{json,js,jsx,ts,tsx}\" --write",
"prettier:check": "prettier \"src/**/*.{json,js,jsx,ts,tsx}\" --check",
"test": "jest --clearCache --coverage"
},
"dependencies": {
Expand Down
21 changes: 21 additions & 0 deletions backend/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"compilerOptions": {
/* Language and Environment */
"target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,

/* Modules */
"module": "commonjs" /* Specify what module code is generated. */,
"resolveJsonModule": true /* Enable importing .json files. */,

/* Emit */
"outDir": "build" /* Specify an output folder for all emitted files. */,

/* Interop Constraints */
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,

/* Type Checking */
"strict": true /* Enable all strict type-checking options. */,
"skipLibCheck": true /* Skip type checking all .d.ts files. */
}
}

0 comments on commit 365dbe7

Please sign in to comment.