Skip to content

Commit

Permalink
add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
acao committed Aug 6, 2023
1 parent e05bdb3 commit 9f912f6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on:
pull_request:
types:
- synchronize
- opened

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Cache Swapi Data
uses: actions/cache@v3
with:
path: cache/data.json
key: swapi-data
- name: Install dependencies
run: npm ci
- name: Test
run: npm run test
- name: Build
run: npm run build
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
[[plugins]]
package = "netlify-plugin-cache"
[plugins.inputs]
paths = ["cache/data.json"]
paths = ["cache/data.json"]
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"type": "module",
"scripts": {
"postinstall": "npm run download && npm run build",
"dev": "npm run download && netlify dev -c 'tsc --watch'",
"start": "netlify build",
"test": "npm run lint && npm run check && npm run test:only",
Expand All @@ -42,16 +41,13 @@
"graphql-relay": "0.10.0"
},
"devDependencies": {
"@types/jest": "^29.5.3",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"eslint": "^8.46.0",
"isomorphic-fetch": "2.2.1",
"jest": "^29.6.2",
"netlify-cli": "^15.10.0",
"netlify-plugin-cache": "^1.0.3",
"prettier": "^1.18.2",
"ts-jest": "^29.1.1",
"typescript": "^5.1.6",
"vitest": "^0.34.1"
},
Expand Down

0 comments on commit 9f912f6

Please sign in to comment.