[pre-commit.ci] pre-commit autoupdate #1067
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: Complementary config test | |
on: | |
pull_request: | |
branches: | |
- 'develop-1.9' | |
- 'develop' | |
paths: | |
- '**' | |
- '!docs/**' | |
- '!*.rst' | |
- '!*.md' | |
- '!datacube_ows/__init__.py' | |
- '!.github/**' | |
- '.github/workflows/complementary-config-test.yaml' | |
push: | |
branches: | |
- 'develop-1.9' | |
- 'develop' | |
paths: | |
- '**' | |
- '!docs/**' | |
- '!*.rst' | |
- '!*.md' | |
- '!datacube_ows/__init__.py' | |
- '!.github/**' | |
- '.github/workflows/complementary-config-test.yaml' | |
env: | |
DOCKER_IMAGE: ghcr.io/opendatacube/ows:tests | |
permissions: {} | |
# When a PR is updated, cancel the jobs from the previous version. Merges | |
# do not define head_ref, so use run_id to never cancel those jobs. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
dea-config: | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- name: git checkout ows | |
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
with: | |
fetch-depth: 0 | |
path: datacube-ows | |
- name: git checkout dea-config | |
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
with: | |
repository: GeoscienceAustralia/dea-config | |
path: dea-config | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | |
- name: Get Git commit timestamps | |
run: | | |
TIMESTAMP=$(cd datacube-ows && git log -1 --pretty=%ct pyproject.toml uv.lock datacube_ows) | |
echo "TIMESTAMP=$TIMESTAMP" >> $GITHUB_ENV | |
- name: Build Docker | |
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 | |
with: | |
file: datacube-ows/Dockerfile | |
context: datacube-ows | |
tags: ${{ env.DOCKER_IMAGE }} | |
load: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
env: | |
SOURCE_DATE_EPOCH: ${{ env.TIMESTAMP }} | |
- name: Config parser check | |
run: | | |
export LOCAL_UID=$(id -u $USER) | |
export LOCAL_GID=$(id -g $USER) | |
cd ./datacube-ows | |
export $(grep -v '^#' ./complementary_config_test/.env_complementary_config_dea_dev | xargs) | |
docker compose -f docker-compose.yaml -f docker-compose.cleandb.yaml up --quiet-pull -d --wait | |
docker compose -f docker-compose.yaml -f docker-compose.cleandb.yaml exec -T ows /bin/sh -c "datacube system init; datacube system check" | |
docker compose -f docker-compose.yaml -f docker-compose.cleandb.yaml exec -T ows /bin/sh -c "curl https://raw.githubusercontent.com/GeoscienceAustralia/dea-config/master/dev/services/wms/inventory.json -o /tmp/inventory.json" | |
docker compose -f docker-compose.yaml -f docker-compose.db.yaml exec -T ows /bin/sh -c "cd /src && ./compare-cfg.sh" | |
docker compose -f docker-compose.yaml -f docker-compose.cleandb.yaml down |