Skip to content

Commit

Permalink
ci: fix kv-warmer, format files and run tests in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
zackpollard committed Aug 21, 2024
1 parent 46d4129 commit c97c555
Show file tree
Hide file tree
Showing 11 changed files with 905 additions and 37 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Test
on:
workflow_dispatch:
pull_request:
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
tiles-unit-tests:
name: Tiles
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./tiles

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: './server/.nvmrc'

- name: Run npm install
run: npm ci

- name: Run linter
run: npm run lint
if: ${{ !cancelled() }}

- name: Run formatter
run: npm run format
if: ${{ !cancelled() }}

- name: Run tsc
run: npm run check
if: ${{ !cancelled() }}

- name: Run unit tests & coverage
run: npm run test:cov
if: ${{ !cancelled() }}
2 changes: 1 addition & 1 deletion tiles/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
},
plugins: ['@typescript-eslint', 'eslint-plugin-import'],
rules: {
'curly': 2,
curly: 2,
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-explicit-any': 'off',
},
Expand Down
17 changes: 17 additions & 0 deletions tiles/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.DS_Store
node_modules
/build
/package
.env
.env.*
!.env.example
*.md
*.json
coverage
dist
worker-configuration.d.ts

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
12 changes: 6 additions & 6 deletions tiles/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"singleQuote": true,
"trailingComma": "all",
"printWidth": 120,
"semi": true,
"organizeImportsSkipDestructiveCodeActions": true,
"plugins": ["prettier-plugin-organize-imports"]
"singleQuote": true,
"trailingComma": "all",
"printWidth": 120,
"semi": true,
"organizeImportsSkipDestructiveCodeActions": true,
"plugins": ["prettier-plugin-organize-imports"]
}
Loading

0 comments on commit c97c555

Please sign in to comment.