8000 chore(ci): setup ci (#7) · homebaseio/homebase-react@fd032a8 · GitHub
[go: up one dir, main page]

Skip to content

Commit fd032a8

Browse files
chore(ci): setup ci (#7)
1 parent ca8d651 commit fd032a8

File tree

11 files changed

+2063
-2924
lines changed

11 files changed

+2063
-2924
lines changed

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
3+
on: push
4+
5+
jobs:
6+
test:
7+
name: Test
8+
runs-on: ubuntu-18.04
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: '12'
15+
16+
- name: Get yarn cache directory path
17+
id: yarn-cache-dir-path
18+
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
19+
20+
- name: Cache yarn packages
21+
uses: actions/cache@v2
22+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
23+
with:
24+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
25+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
26+
restore-keys: |
27+
${{ runner.os }}-yarn-
28+
29+
- name: Cache maven packages
30+
uses: actions/cache@v2
31+
with:
32+
path: ~/.m2
33+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
34+
restore-keys: ${{ runner.os }}-m2
35+
36+
- name: Cache shadow-cljs
37+
uses: actions/cache@v2
38+
with:
39+
path: .shadow-cljs
40+
key: ${{ runner.os }}-shadow-cljs-${{ hashFiles('**/pom.xml') }}
41+
restore-keys: ${{ runner.os }}-shadow-cljs
42+
43+
- run: yarn install --frozen-lockfile
44+
45+
- run: yarn shadow-cljs compile test
46+
47+
- run: node out/node-tests.js
48+
env:
49+
CI: true

.github/workflows/main.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Publish Examples
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
publish-examples:
9+
name: Publish Examples
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- uses: actions/setup-node@v1
15+
with:
16+
node-version: '12'
17+
18+
- name: Get yarn cache directory path
19+
id: yarn-cache-dir-path
20+
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
21+
22+
- name: Cache yarn packages
23+
uses: actions/cache@v2
24+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
25+
with:
26+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
27+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
28+
restore-keys: |
29+
${{ runner.os }}-yarn-
30+
31+
- name: Cache maven packages
32+
uses: actions/cache@v2
33+
with:
34+
path: ~/.m2
35+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
36+
restore-keys: ${{ runner.os }}-m2
37+
38+
- name: Cache shadow-cljs
39+
uses: actions/cache@v2
40+
with:
41+
path: .shadow-cljs
42+
key: ${{ runner.os }}-shadow-cljs-${{ hashFiles('**/pom.xml') }}
43+
restore-keys: ${{ runner.os }}-shadow-cljs
44+
45+
- run: yarn install --frozen-lockfile
46+
47+
- run: yarn shadow-cljs compile dev
48+
49+
- name: Publish to GitHub Pages 🚀
50+
uses: JamesIves/github-pages-deploy-action@releases/v3
51+
with:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
BRANCH: gh-pages # The branch the action should deploy to.
54+
FOLDER: public # The folder the action should deploy.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
node_modules/
22
public/js
3+
out/
34

45
/target
56
/checkouts
67
/src/gen
78

9+
package-lock.json
810
pom.xml
911
pom.xml.asc
1012
*.iml

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ todos
148148
## Development
149149

150150
```bash
151-
npm install
152-
npx shadow-cljs watch :dev
151+
yarn install
152+
yarn shadow-cljs watch :dev
153153
```
154154

155155
Open http://localhost:3000

0 commit comments

Comments
 (0)
0