Skip to content

Commit

Permalink
Merge pull request #13 from restatedev/lint-format-check
Browse files Browse the repository at this point in the history
Add lint and format check
  • Loading branch information
jackkleeman authored Aug 16, 2023
2 parents ec7dfb1 + 562e073 commit 0b84a55
Show file tree
Hide file tree
Showing 6 changed files with 966 additions and 2,586 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and test

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
# prevent from running on forks
if: github.repository_owner == 'restatedev'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [19.x]

steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
env:
GH_PACKAGE_READ_ACCESS_TOKEN: ${{ secrets.GH_PACKAGE_READ_ACCESS_TOKEN }}
- run: npm run -ws verify
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@restatedev:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=${GH_PACKAGE_READ_ACCESS_TOKEN}
1 change: 1 addition & 0 deletions lambda-greeter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"scripts": {
"lint": "eslint --ignore-path .eslintignore --ext .ts .",
"format": "prettier --ignore-path .eslintignore --write \"**/*.+(js|ts|json)\"",
"verify": "npm run format -- --check && npm run lint && npm run build",
"build": "tsc --noEmitOnError",
"bundle": "esbuild src/app.ts --bundle --minify --sourcemap --platform=node --target=es2020 --outfile=dist/index.js",
"postbundle": "cd dist && zip -r index.zip index.js*",
Expand Down
Loading

0 comments on commit 0b84a55

Please sign in to comment.