Skip to content

Commit

Permalink
enhanced testing
Browse files Browse the repository at this point in the history
  • Loading branch information
james-rae committed Jul 25, 2024
1 parent 841006b commit 39fcfdd
Show file tree
Hide file tree
Showing 17 changed files with 1,624 additions and 137 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: latest
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
node-version: latest
cache: 'npm'
registry-url: 'https://registry.npmjs.org'

- name: Get dist files
uses: actions/cache@v4
Expand All @@ -30,8 +30,8 @@ jobs:
id: get-docs-cache
uses: actions/cache@v4
with:
path: docs
key: docs-${{ inputs.cache_sha }}
path: docs
key: docs-${{ inputs.cache_sha }}

- name: Add docs folder to dist
if: steps.get-docs-cache.outputs.cache-hit == 'true'
Expand All @@ -48,15 +48,15 @@ jobs:
- name: Publish to NPM
if: github.repository == 'ramp4-pcar4/ramp4-pcar4' && startsWith(github.ref, 'refs/tags/v')
run: |
TAG_VERSION=${GITHUB_REF#refs/tags/v}
PACKAGE_VERSION=$(node -p "require('./package.json').version")
if [ "$TAG_VERSION" != "$PACKAGE_VERSION" ]; then
npm version --allow-same-version --no-git-tag-version $TAG_VERSION
fi
TAG_VERSION=${GITHUB_REF#refs/tags/v}
PACKAGE_VERSION=$(node -p "require('./package.json').version")
if [ "$TAG_VERSION" != "$PACKAGE_VERSION" ]; then
npm version --allow-same-version --no-git-tag-version $TAG_VERSION
fi
npm publish
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- uses: actions/github-script@v6
name: Post link to demo for PR's
Expand All @@ -69,6 +69,11 @@ jobs:
repo: context.repo.repo,
body: `Your demo site is ready! 🚀
Enhanced Testing:
Samples: https://${{github.repository_owner}}.github.io/ramp4-pcar4/${{github.head_ref}}/demos/enhanced-samples.html
Catalogue: https://${{github.repository_owner}}.github.io/ramp4-pcar4/${{github.head_ref}}/demos/enhanced-all.html
Legacy Testing:
Main: https://${{github.repository_owner}}.github.io/ramp4-pcar4/${{github.head_ref}}/
Catalogue: https://${{github.repository_owner}}.github.io/ramp4-pcar4/${{github.head_ref}}/demos/index-all.html
Samples: https://${{github.repository_owner}}.github.io/ramp4-pcar4/${{github.head_ref}}/demos/index-samples.html`
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "chrome",
"request": "launch",
"name": "Launch Chrome",
"url": "https://localhost:5173/demos/index-samples.html", // If your vite server launches at 127.0.0.1, update the url to 127.0.0.1:5173.
"url": "https://localhost:5173/demos/enhanced-samples.html", // If your vite server launches at 127.0.0.1, update the url to 127.0.0.1:5173.
"webRoot": "${workspaceFolder}/src",
"sourceMapPathOverrides": {
"webpack:///src/*": "$(webRoot)/*"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ npm ci
```sh
npm run dev
```

Open `https://localhost:5173/demos/index-samples.html` in your browser.
Current Samples: `https://localhost:5173/demos/enhanced-samples.html`.
Legacy Samples: `https://localhost:5173/demos/index-samples.html`.

#### Serve via `http`

Expand Down Expand Up @@ -123,6 +123,6 @@ During build, the `public` folder contents are placed into the `dist` folder.

### Demo Builds

The demos of the most recent build are available at https://ramp4-pcar4.github.io/ramp4-pcar4/main/demos/index-all.html.
The demos of the most recent build are available at https://ramp4-pcar4.github.io/ramp4-pcar4/main/demos/enhanced-all.html.

Demo builds are automatically generated for pull requests if you are a member of the [ramp4-pcar4 organization](https://github.com/orgs/ramp4-pcar4/people) and have your visibility set to public.
126 changes: 126 additions & 0 deletions demos/enhanced-all.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<html>
<head>
<title>R4MP Enhanced Samples Yellow Pages</title>
<style>
.tag {
display: inline-block;
border-radius: 3px;
padding: 0.2em 0.5em 0.3em;
margin: 0.25em 0.1em;
background: #888888;
color: #000000;
}
.layer {
background: #41b883;
}
.legend {
background: #b8b641;
}
.misc {
background: #ee7d20;
}
body {
background-color: black;
color: aliceblue;
}
a {
color: deepskyblue;
}
li,
p {
font-size: 1.1rem;
}
</style>
</head>
<body>
<h1>RAMP 4 Enhanced Samples Catalogue</h1>
<h2>Classic Samples</h2>
<p>Are found <a href="index-all.html">here</a>.</p>

<h2>Simple Samples</h2>
<p>
Samples with no fancy configuration. Useful for testing the basics.
</p>
<ul>
<li>
01.
<a href="enhanced-samples.html?sample=1">Happy</a>. Very basic
site for fast dev spinup. Default choice.
</li>
<li>
02.
<a href="enhanced-samples.html?sample=2">No Layers</a>. Test
template config untouched except for legend text.
</li>
<li>
03.
<a href="enhanced-samples.html?sample=3">Feature Layers</a>.
Couple of feature layers
</li>
<li>
04.
<a href="enhanced-samples.html?sample=4">Map Image Layers</a>.
An MIL with two sublayers.
</li>
<li>
05.
<a href="enhanced-samples.html?sample=5">File Layers</a>.
GeoJSON, CSV, and Shapefile layers.
</li>
<li>
06.
<a href="enhanced-samples.html?sample=6">Data Layers</a>. A
table service and custom JSON layer.
</li>
</ul>

<h2>Fancy Samples</h2>
<p>Samples with gnarlier configuration.</p>
<ul>
<li>
07.
<a href="index-samples.html?sample=7">O.G. Main</a>. The first /
default sample from the classic samples.
</li>
</ul>

<h2>Respect for Apps</h2>
<p>
Maps that are currently being used on real sites, demonstrated with
RAMP4. Note that some not all the features on the real sites are
currently supported.
</p>
<ul>
<li>Stuff to be added.</li>
</ul>

<h2>Various Templates</h2>
<p>Maps that are embedded in pages with different templates.</p>
<ul>
<li>
<a href="index-multi.html">Multiple RAMP instances</a>
</li>
<li>
<a href="index-form.html">RAMP within a form</a>
</li>
<li>
<a href="index-wet.html">RAMP inside the WET template</a>
</li>
<li>
<a href="index-teleport-details.html"
>RAMP with a teleported details panel</a
>
</li>
<li>
<a href="index-teleport-wet.html"
>RAMP inside the WET template with teleport enabled</a
>
</li>
<li>
<a href="index-multi-wet.html"
>Multiple RAMP instances inside the WET template</a
>
</li>
</ul>
</body>
</html>
Loading

0 comments on commit 39fcfdd

Please sign in to comment.