Skip to content

Commit 9f912f6

Browse files
committed
add github workflow
1 parent e05bdb3 commit 9f912f6

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed

.github/workflows/pr.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
on:
2+
pull_request:
3+
types:
4+
- synchronize
5+
- opened
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-node@v3
13+
- name: Cache Swapi Data
14+
uses: actions/cache@v3
15+
with:
16+
path: cache/data.json
17+
key: swapi-data
18+
- name: Install dependencies
19+
run: npm ci
20+
- name: Test
21+
run: npm run test
22+
- name: Build
23+
run: npm run build

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
[[plugins]]
1414
package = "netlify-plugin-cache"
1515
[plugins.inputs]
16-
paths = ["cache/data.json"]
16+
paths = ["cache/data.json"]

package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
},
2020
"type": "module",
2121
"scripts": {
22-
"postinstall": "npm run download && npm run build",
2322
"dev": "npm run download && netlify dev -c 'tsc --watch'",
2423
"start": "netlify build",
2524
"test": "npm run lint && npm run check && npm run test:only",
@@ -42,16 +41,13 @@
4241
"graphql-relay": "0.10.0"
4342
},
4443
"devDependencies": {
45-
"@types/jest": "^29.5.3",
4644
"@typescript-eslint/eslint-plugin": "^6.2.1",
4745
"@typescript-eslint/parser": "^6.2.1",
4846
"eslint": "^8.46.0",
4947
"isomorphic-fetch": "2.2.1",
50-
"jest": "^29.6.2",
5148
"netlify-cli": "^15.10.0",
5249
"netlify-plugin-cache": "^1.0.3",
5350
"prettier": "^1.18.2",
54-
"ts-jest": "^29.1.1",
5551
"typescript": "^5.1.6",
5652
"vitest": "^0.34.1"
5753
},

0 commit comments

Comments
 (0)