add semver #107
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Test Docker Build' | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
concurrency: | |
group: ci-${{ github.ref }}-1 | |
cancel-in-progress: true | |
jobs: | |
ci: | |
name: Test and Build ${{ matrix.arch }} Image | |
runs-on: ${{ matrix.runs-on }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- runs-on: ubuntu-24.04 | |
arch: amd64 | |
- runs-on: ubuntu-24.04-arm | |
arch: arm64 | |
steps: | |
- name: Get OS Architecture | |
run: uname -m | |
- name: Check out repository ✨ | |
uses: actions/checkout@v4 | |
- name: Get Version from package.json | |
id: version | |
run: | | |
currentVersion="$( node -e "console.log(require('./package.json').version)" )" | |
echo "version=$currentVersion" >> "$GITHUB_OUTPUT" | |
echo "currentVersion: $currentVersion" | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Test Docker Build | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: false | |
load: true | |
tags: contour-generator | |
platforms: linux/${{ matrix.arch }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: End to End Test pyramid | |
run: | | |
docker run --rm contour-generator pyramid --z 9 --x 272 --y 179 --demUrl "pmtiles://https://acalcutt.github.io/contour-generator/test_data/terrain-tiles.pmtiles" --sourceMaxZoom 12 --encoding mapbox --increment 0 --outputDir "./output_pyramid" --outputMaxZoom 15 -v | |
- name: End to End Test bbox | |
run: | | |
docker run --rm contour-generator bbox --minx -73.51 --miny 41.23 --maxx -69.93 --maxy 42.88 --demUrl "https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png" --sourceMaxZoom 15 --encoding terrarium --increment 50 --outputMinZoom 5 --outputMaxZoom 10 --outputDir "./output_bbox" -v | |
- name: Download Test Data | |
run: | | |
curl -L -o JAXA_2024_terrainrgb_z0-Z6_webp.pmtiles https://github.com/acalcutt/contour-generator/releases/download/test_data/JAXA_2024_terrainrgb_z0-Z6_webp.pmtiles | |
if [[ $? -ne 0 ]]; then | |
echo "Error downloading the test data!" | |
exit 1 | |
fi | |
- name: End to End Test zoom | |
run: | | |
docker run --rm -v $(pwd):/data contour-generator zoom --demUrl "pmtiles:///data/JAXA_2024_terrainrgb_z0-Z6_webp.pmtiles" --sourceMaxZoom 6 --encoding mapbox --outputMinZoom 5 --outputMaxZoom 6 --increment 100 --processes 4 --outputDir "./output_zoom" -v |