Skip to content

Commit

Permalink
Merge pull request #177 from stac-utils/patch/update-ci
Browse files Browse the repository at this point in the history
Patch/update ci
  • Loading branch information
vincentsarago authored Aug 22, 2024
2 parents d962b3f + 6a44def commit 3582099
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 23 deletions.
11 changes: 10 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand All @@ -12,3 +11,13 @@ updates:
all:
patterns:
- "*"

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
groups:
pgstac:
dependency-type: "development"
patterns:
- "pypgstac*"
28 changes: 9 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:

jobs:
tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
Expand All @@ -37,12 +37,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: install lib postgres
run: |
sudo apt update
wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O- | sudo apt-key add -
echo "deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main" | sudo tee /etc/apt/sources.list.d/postgresql.list
sudo apt update
sudo apt-get install --yes libpq-dev postgis postgresql-14-postgis-3
uses: nyurik/action-setup-postgis@v2

- name: Install dependencies
run: |
Expand All @@ -69,29 +64,24 @@ jobs:

benchmark:
needs: [tests]
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
env:
PGSTAC_VERSION: '0.8.1'
PGSTAC_VERSION: '0.9.1'
steps:
- uses: actions/checkout@v4

- name: Set up Python
- name: Set up Python ${{ env.LATEST_PY_VERSION }}
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: ${{ env.LATEST_PY_VERSION }}

- name: Launch services
run: docker-compose up -d tiler-uvicorn
run: docker compose up -d tiler-uvicorn
env:
PGSTAC_VERSION: ${{ env.PGSTAC_VERSION }}

- name: install lib postgres
run: |
sudo apt update
wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O- | sudo apt-key add -
echo "deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main" | sudo tee /etc/apt/sources.list.d/postgresql.list
sudo apt update
sudo apt-get install --yes libpq-dev postgis postgresql-14-postgis-3
uses: nyurik/action-setup-postgis@v2

- name: Install python dependencies
run: |
Expand Down Expand Up @@ -127,7 +117,7 @@ jobs:
auto-push: ${{ github.ref == 'refs/heads/main' }}

- name: Stop services
run: docker-compose stop
run: docker compose stop

publish:
needs: [tests]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ $ uvicorn titiler.pgstac.main:app --reload
```
$ git clone https://github.com/stac-utils/titiler-pgstac.git
$ cd titiler-pgstac
$ docker-compose up --build tiler
$ docker compose up --build tiler
```

It runs `titiler.pgstac` using Gunicorn web server. To run Uvicorn based version:

```
$ docker-compose up --build tiler-uvicorn
$ docker compose up --build tiler-uvicorn
```

## Contribution & Development
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ test = [
"pytest-cov",
"pytest-asyncio",
"httpx",
"pypgstac>=0.8",
"pypgstac>=0.7,<=0.9.1",
"psycopg2",
"pytest-pgsql",
]
Expand Down

1 comment on commit 3582099

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'TiTiler-pgSTAC Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.30.

Benchmark suite Current: 3582099 Previous: 2523169 Ratio
.github/workflows/tests/benchmarks.py::test_benchmark_tile[2/2/1] 10.522572135218033 iter/sec (stddev: 0.004115577111321165) 13.943646766608499 iter/sec (stddev: 0.004064200458908511) 1.33
.github/workflows/tests/benchmarks.py::test_benchmark_tile[3/5/0] 15.06111119667381 iter/sec (stddev: 0.004916736063989323) 22.14838467567025 iter/sec (stddev: 0.0061122012564945715) 1.47
.github/workflows/tests/benchmarks.py::test_benchmark_tile[4/5/9] 17.614712318556126 iter/sec (stddev: 0.004390699494524057) 29.109679077122063 iter/sec (stddev: 0.003607727351087623) 1.65
.github/workflows/tests/benchmarks.py::test_benchmark_tile[5/16/5] 15.8184836175918 iter/sec (stddev: 0.0034665874723311335) 23.862257746345648 iter/sec (stddev: 0.003627945483672226) 1.51
.github/workflows/tests/benchmarks.py::test_benchmark_tile[6/43/31] 15.867692186724758 iter/sec (stddev: 0.0032868533795963046) 23.93275334930989 iter/sec (stddev: 0.003950241620377645) 1.51

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.