Skip to content

Commit a86d148

Browse files
committed
Run tsc on prebuild, add GitHub Actions CI checks
1 parent 8441bb6 commit a86d148

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- main
7+
- release*
8+
9+
jobs:
10+
tests:
11+
name: Lint, Test, Build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- run: echo "🔎 Job triggered by ${{ github.event_name }} event on branch ${{ github.ref }} in repository ${{ github.repository }}."
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: lts/*
21+
- name: Install dependencies
22+
run: npm install --legacy-peer-deps # TODO remove --legacy-peer-deps after https://github.com/patternfly/patternfly-react-seed/issues/134 is fixed
23+
- name: Check TypeScript types
24+
run: npm run type-check
25+
- name: Run eslint
26+
run: npm run lint
27+
- name: Run tests
28+
run: npm run test
29+
- name: Attempt a build
30+
run: npm run build

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"license": "MIT",
88
"private": true,
99
"scripts": {
10-
"prebuild": "npm run clean",
10+
"prebuild": "npm run clean && npm run type-check",
1111
"dr:surge": "node dr-surge.js",
1212
"build": "webpack --config webpack.prod.js && npm run dr:surge",
1313
"start": "sirv dist --cors --single --host --port 8080",

0 commit comments

Comments
 (0)