Skip to content

Commit 2d1e90f

Browse files
committed
feat: add node console playground (romcal#16)
1 parent 5d08343 commit 2d1e90f

24 files changed

+10124
-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: 39 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,8 @@ 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+
run: npm ci --no-audit -q
5454
- name: Run Cypress
5555
uses: cypress-io/github-action@v6
5656
if: matrix.project != 'react-app'
@@ -59,14 +59,15 @@ jobs:
5959
build: npm run build -- --logLevel error
6060
browser: ${{ matrix.browser }}
6161
start: npm start
62+
install: false
6263
- name: Run Cypress
6364
if: matrix.project == 'react-app'
6465
uses: cypress-io/github-action@v6
6566
with:
6667
working-directory: ${{ matrix.project }}
6768
start: npm run serve
6869
browser: ${{ matrix.browser }}
69-
install: true
70+
install: false
7071
- uses: actions/upload-artifact@master
7172
if: failure()
7273
with:
@@ -94,7 +95,6 @@ jobs:
9495
with:
9596
node-version-file: '.nvmrc'
9697
cache: 'npm'
97-
cache-dependency-path: ${{ matrix.project }}/package-lock.json
9898
- name: Install Dependencies
9999
run: npm ci
100100
- name: Run Unit Tests
@@ -121,26 +121,37 @@ jobs:
121121
if: ${{ (contains(needs.*.result, 'failure')) && (contains(needs.*.conclusion, 'cancelled')) && (contains(needs.*.conclusion, 'skipped')) }}
122122
run: exit 1
123123
# 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-
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: Checkout
132+
uses: actions/checkout@v4
133+
with:
134+
fetch-depth: 0
135+
- name: Install Node.js
136+
uses: actions/setup-node@v4
137+
with:
138+
node-version-file: '.nvmrc'
139+
cache: 'npm'
140+
- name: Install Dependencies
141+
run: npm ci
142+
- name: Build React App
143+
working-directory: react-app
144+
run: VITE_DAY_VARIANT=developer npm run build
145+
- name: Deploy
146+
uses: peaceiris/actions-gh-pages@v4
147+
with:
148+
working-directory: react-app
149+
deploy_key: ${{ secrets.DEPLOY_TOKEN }}
150+
external_repository: romcal/romcal.github.io
151+
publish_branch: gh-pages
152+
publish_dir: ./build
153+
cname: romcal.js.org
154+
commit_message: ${{ github.event.head_commit.message }}
155+
force_orphan: true
156+
user_name: 'romcalproject'
157+
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)