Skip to content

chore(deps): bump aws-cdk from 2.1132.0 to 2.1135.1 #325

chore(deps): bump aws-cdk from 2.1132.0 to 2.1135.1

chore(deps): bump aws-cdk from 2.1132.0 to 2.1135.1 #325

Workflow file for this run

name: CI
# On every pull request, but only on push to main
on:
push:
branches:
- main
tags:
- '*'
paths:
- 'runtimes/**'
- 'infrastructure/**'
- 'docker-compose.*'
- 'dockerfiles/**'
- '.github/workflows/ci.yml'
- '.github/workflows/deploy.yaml'
- '.github/workflows/publish-containers.yml'
- '.pre-commit-config.yaml'
pull_request:
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
env:
COMPOSE_FILE: docker-compose.yml:docker-compose.mock-oidc.yml
strategy:
fail-fast: false
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
- name: Install
run: uv sync
- name: Run pre-commit
run: uv run pre-commit run --all-files
- name: Launch services
run: docker compose up -d
- name: install lib postgres
uses: nyurik/action-setup-postgis@228cfe4dd41aad01801a0bdc767040e5024fff1d # v2
- name: Ingest Stac Items/Collection
run: |
uv run pypgstac pgready --dsn postgresql://username:password@0.0.0.0:5439/postgis
uv run pypgstac load collections .github/workflows/data/noaa-emergency-response.json --dsn postgresql://username:password@0.0.0.0:5439/postgis --method insert_ignore
uv run pypgstac load items .github/workflows/data/noaa-eri-nashville2020.json --dsn postgresql://username:password@0.0.0.0:5439/postgis --method insert_ignore
psql postgresql://username:password@0.0.0.0:5439/postgis -f .github/workflows/data/my_data.sql
# see https://github.com/developmentseed/tipg/issues/37
- name: Restart the Vector service
run: |
docker compose restart vector
- name: Wait for services
run: |
wait_for_service() {
name="$1"
url="$2"
for _ in $(seq 1 60); do
if curl --fail --silent --output /dev/null "$url"; then
echo "$name is ready"
return 0
fi
sleep 1
done
echo "$name did not become ready at $url"
docker compose ps
docker compose logs "$name"
return 1
}
wait_for_service stac-auth-proxy http://127.0.0.1:8080/stac/_mgmt/ping
wait_for_service raster http://127.0.0.1:8080/raster/healthz
wait_for_service vector http://127.0.0.1:8080/vector/
shell: bash
- name: Integrations tests
run: uv run pytest .github/workflows/tests/
- name: Stop services
if: always()
run: docker compose down
check-release-version:
name: Check release version consistency
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Verify release tag matches project version
run: |
TAG="${GITHUB_REF#refs/tags/}"
PYPROJECT=$(grep '^version = ' pyproject.toml | sed -E 's/version = "(.*)"/\1/')
STAC=$(grep '__version__' runtimes/eoapi/stac/eoapi/stac/__init__.py | sed -E 's/__version__ = "(.*)".*/\1/')
RASTER=$(grep '__version__' runtimes/eoapi/raster/eoapi/raster/__init__.py | sed -E 's/__version__ = "(.*)".*/\1/')
VECTOR=$(grep '__version__' runtimes/eoapi/vector/eoapi/vector/__init__.py | sed -E 's/__version__ = "(.*)".*/\1/')
fail() { echo "$1"; exit 1; }
[ "$TAG" = "$PYPROJECT" ] || fail "Tag ($TAG) != pyproject.toml ($PYPROJECT)"
[ "$TAG" = "$STAC" ] || fail "Tag ($TAG) != stac __version__ ($STAC)"
[ "$TAG" = "$RASTER" ] || fail "Tag ($TAG) != raster __version__ ($RASTER)"
[ "$TAG" = "$VECTOR" ] || fail "Tag ($TAG) != vector __version__ ($VECTOR)"
echo "All versions match: $TAG"
publish-containers:
name: Publish containers
needs: [tests, check-release-version]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
uses: ./.github/workflows/publish-containers.yml
with:
ref: ${{ github.ref_name }}
version: ${{ github.ref_name }}
tag_latest: true
permissions:
contents: read
packages: write
deploy:
name: Deploy
needs: [tests]
if: >-
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
uses: ./.github/workflows/deploy.yaml
with:
job: all
ref: ${{ github.event.pull_request.head.sha || github.ref_name }}
permissions:
id-token: write
contents: read