Skip to content

Commit d7cda76

Browse files
authored
feat: add node console playground (romcal#16)
1 parent 5d08343 commit d7cda76

24 files changed

+10125
-37962
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
with:
2929
node-version-file: '.nvmrc'
3030
cache: 'npm'
31-
cache-dependency-path: ${{ matrix.project }}/package-lock.json
3231
- name: Install Dependencies
3332
run: npm ci
3433
- name: Run linters
@@ -54,7 +53,8 @@ jobs:
5453
with:
5554
node-version-file: '.nvmrc'
5655
cache: 'npm'
57-
cache-dependency-path: ${{ matrix.project }}/package-lock.json
56+
- name: Install Dependencies
57+
run: npm ci
5858
- name: Run Cypress
5959
uses: cypress-io/github-action@v6
6060
if: matrix.project != 'react-app'
@@ -63,14 +63,15 @@ jobs:
6363
build: npm run build -- --logLevel error
6464
browser: ${{ matrix.browser }}
6565
start: npm start
66+
install: false
6667
- name: Run Cypress
6768
if: matrix.project == 'react-app'
6869
uses: cypress-io/github-action@v6
6970
with:
7071
working-directory: ${{ matrix.project }}
7172
start: npm run serve
7273
browser: ${{ matrix.browser }}
73-
install: true
74+
install: false
7475
- uses: actions/upload-artifact@master
7576
if: always()
7677
with:
@@ -103,7 +104,6 @@ jobs:
103104
with:
104105
node-version-file: '.nvmrc'
105106
cache: 'npm'
106-
cache-dependency-path: ${{ matrix.project }}/package-lock.json
107107
- name: Install Dependencies
108108
run: npm ci
109109
- name: Run Unit Tests

.github/workflows/deploy.yml

Lines changed: 40 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Deploy
22
on:
33
push:
44
branches:
@@ -24,7 +24,6 @@ jobs:
2424
with:
2525
node-version-file: '.nvmrc'
2626
cache: 'npm'
27-
cache-dependency-path: ${{ matrix.project }}/package-lock.json
2827
- name: Install Dependencies
2928
run: npm ci
3029
- name: Run linters
@@ -50,7 +49,9 @@ jobs:
5049
with:
5150
node-version-file: '.nvmrc'
5251
cache: 'npm'
53-
cache-dependency-path: ${{ matrix.project }}/package-lock.json
52+
- name: Install Dependencies
53+
working-directory: "."
54+
run: npm ci
5455
- name: Run Cypress
5556
uses: cypress-io/github-action@v6
5657
if: matrix.project != 'react-app'
@@ -59,14 +60,15 @@ jobs:
5960
build: npm run build -- --logLevel error
6061
browser: ${{ matrix.browser }}
6162
start: npm start
63+
install: false
6264
- name: Run Cypress
6365
if: matrix.project == 'react-app'
6466
uses: cypress-io/github-action@v6
6567
with:
6668
working-directory: ${{ matrix.project }}
6769
start: npm run serve
6870
browser: ${{ matrix.browser }}
69-
install: true
71+
install: false
7072
- uses: actions/upload-artifact@master
7173
if: failure()
7274
with:
@@ -94,7 +96,6 @@ jobs:
9496
with:
9597
node-version-file: '.nvmrc'
9698
cache: 'npm'
97-
cache-dependency-path: ${{ matrix.project }}/package-lock.json
9899
- name: Install Dependencies
99100
run: npm ci
100101
- name: Run Unit Tests
@@ -121,26 +122,37 @@ jobs:
121122
if: ${{ (contains(needs.*.result, 'failure')) && (contains(needs.*.conclusion, 'cancelled')) && (contains(needs.*.conclusion, 'skipped')) }}
122123
run: exit 1
123124
# TODO: test publishing to another repo first
124-
#publish:
125-
# name: Publish
126-
# runs-on: ubuntu-latest
127-
# if: github.repository == 'romcal/romcal-examples' && !contains(github.event.head_commit.message, '[skip ci]')
128-
# needs:
129-
# - verify
130-
# steps:
131-
# - name: Build React App
132-
# working-directory: react-app
133-
# run: VITE_DAY_VARIANT=developer npm run build
134-
# - name: Deploy
135-
# uses: peaceiris/actions-gh-pages@v4
136-
# with:
137-
# deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
138-
# external_repository: romcal/romcal.github.io
139-
# publish_branch: gh-pages
140-
# publish_dir: ./build
141-
# cname: romcal.js.org
142-
# commit_message: ${{ github.event.head_commit.message }}
143-
# force_orphan: true
144-
# user_name: 'romcalproject'
145-
# user_email: '[email protected]'
146-
125+
publish:
126+
name: Publish
127+
runs-on: ubuntu-latest
128+
if: github.repository == 'romcal/romcal-examples' && !contains(github.event.head_commit.message, '[skip ci]')
129+
needs:
130+
- verify
131+
steps:
132+
- name: Checkout
133+
uses: actions/checkout@v4
134+
with:
135+
fetch-depth: 0
136+
- name: Install Node.js
137+
uses: actions/setup-node@v4
138+
with:
139+
node-version-file: '.nvmrc'
140+
cache: 'npm'
141+
- name: Install Dependencies
142+
run: npm ci
143+
- name: Build React App
144+
working-directory: react-app
145+
run: VITE_DAY_VARIANT=developer npm run build
146+
- name: Deploy
147+
uses: peaceiris/actions-gh-pages@v4
148+
with:
149+
working-directory: react-app
150+
deploy_key: ${{ secrets.DEPLOY_TOKEN }}
151+
external_repository: romcal/romcal.github.io
152+
publish_branch: gh-pages
153+
publish_dir: ./build
154+
cname: romcal.js.org
155+
commit_message: ${{ github.event.head_commit.message }}
156+
force_orphan: true
157+
user_name: 'romcalproject'
158+
user_email: '[email protected]'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ lib-cov
2222
# Coverage directory used by tools like istanbul
2323
coverage
2424
*.lcov
25+
*/*-cypress-report.xml
2526

2627
# nyc test coverage
2728
.nyc_output

0 commit comments

Comments
 (0)