Skip to content

lower the precision for user submitted geojson to 5 decimal places. n… #603

lower the precision for user submitted geojson to 5 decimal places. n…

lower the precision for user submitted geojson to 5 decimal places. n… #603

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Test
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
paths-ignore:
- "ipynb/**"
- "k8s/**"
branches:
- main
pull_request:
paths-ignore:
- "ipynb/**"
- "k8s/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
COMPOSE_FILE: docker-stack.yml
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_BUILDKIT: 1
ARTIFACT_REGISTRY: gcr.io/tacoma-app
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
image: [stormpiper-test, redis, postgis, bg_worker]
steps:
- uses: actions/checkout@v3
- name: Set sha_short
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Prepare tags
id: prep
run: |
DOCKER_IMAGE=$ARTIFACT_REGISTRY/${{ matrix.image }}
VERSION=ci-test-${{ steps.vars.outputs.sha_short }}
TAGS=${DOCKER_IMAGE}:${VERSION}
echo "tags: ${TAGS}"
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Inspect builder
run: |
echo "Name: ${{ steps.buildx.outputs.name }}"
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
echo "Status: ${{ steps.buildx.outputs.status }}"
echo "Flags: ${{ steps.buildx.outputs.flags }}"
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
- name: Login to GCR
uses: docker/login-action@v2
with:
registry: gcr.io
username: _json_key
password: ${{ secrets.GCR_JSON_KEY }}
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
push: true
context: .
target: ${{ matrix.image }}
tags: ${{ steps.prep.outputs.tags }}
cache-from: type=registry,ref=${{ env.ARTIFACT_REGISTRY }}/${{ matrix.image }}:buildcache
cache-to: type=registry,ref=${{ env.ARTIFACT_REGISTRY }}/${{ matrix.image }}:buildcache,mode=max
outputs:
sha_short: ${{ steps.vars.outputs.sha_short }}
test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Sleep for to let the dust settle
run: sleep 10s
shell: bash
- name: Login to GCR
uses: docker/login-action@v2
with:
registry: gcr.io
username: _json_key
password: ${{ secrets.GCR_JSON_KEY }}
- name: run tests
env:
VERSION: ci-test-${{ needs.build.outputs.sha_short }}
STP_EE_JSON_BASE64: ${{ secrets.STP_EE_JSON_BASE64 }}
run: make coverage-ci
- name: coverage
run: |
docker compose exec -T stormpiper-test coverage report -mi
docker compose exec -T stormpiper-test coverage xml
docker compose cp stormpiper-test:/stormpiper/coverage.xml coverage.xml
docker compose cp stormpiper-test:/stormpiper/.coverage .coverage
- name: upload coverage
uses: codecov/codecov-action@v3