mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 10:51:07 +00:00
app: Rewrite of PMTiles viewer (pmtiles.io) [#49, #551, #555, #556] * Rewrite the app using SolidJS / Tailwind. * Make the map view mobile friendly. * Add an archive inspector for viewing the low level structure of PMTiles. * Add a tile inspector for viewing a single tile in isolation. * Support TileJSON. * Support raster archives.
56 lines
2.3 KiB
YAML
56 lines
2.3 KiB
YAML
name: CI
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build_app:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18.x
|
|
- run: cd js && npm ci && npm run build
|
|
- run: echo "VITE_GIT_SHA=$(git rev-parse --short HEAD)" >> app/.env
|
|
- run: cd app && npm ci && npm run check && npm run build
|
|
- run: cd serverless/aws && npm ci && npx tsc && npm run biome-check && npm run build-zip && cp dist/lambda_function.zip ../../app/dist && npm run build-cloudformation-stack && cp dist/cloudformation-stack.yaml ../../app/dist
|
|
- run: cd serverless/cloudflare && cp wrangler.toml.example wrangler.toml && npm ci && npx tsc && npm run biome-check && npm run build && cp dist/index.js ../../app/dist
|
|
- run: cd spec/v3 && cp *.pmtiles ../../app/dist
|
|
- run: cd js/examples && mkdir ../../app/dist/examples && cp *.html ../../app/dist/examples/
|
|
- run: cd js && npm ci && npx typedoc src/index.ts --out ../app/dist/typedoc
|
|
- run : cd openlayers && npm ci && npm run tsc
|
|
- run: cd openlayers/examples && mkdir ../../app/dist/examples/openlayers && cp *.html ../../app/dist/examples/openlayers
|
|
- name: build_app
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
if: ${{ github.ref == 'refs/heads/main' }}
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./app/dist
|
|
force_orphan: true
|
|
cname: pmtiles.io
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18.x
|
|
- run: python .github/check_examples.py
|
|
- run: cd js && npm ci && npm test
|
|
- run: cd js && npm run biome-check
|
|
- run: cd python/pmtiles && python -m unittest test/test_*
|
|
- run: cd python/rio-pmtiles && pip install -r requirements-dev.txt && pip install -e . && PYTHONPATH=. pytest tests
|
|
- run: cd cpp && make
|
|
- run: cd serverless/cloudflare && npm ci && npm test
|