Skip to content

Commit 0b81c63

Browse files
committed
refactor(ci): use path filters to limit ci jobs
1 parent c8935da commit 0b81c63

File tree

14 files changed

+367
-105
lines changed

14 files changed

+367
-105
lines changed

.github/workflows/api.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI (api)
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- api/**
7+
8+
defaults:
9+
run:
10+
working-directory: api
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
env:
17+
CARGO_TERM_COLOR: always
18+
CARGO_TERM_VERBOSE: true
19+
20+
jobs:
21+
test:
22+
strategy:
23+
matrix:
24+
os:
25+
- ubuntu-latest
26+
- macos-latest
27+
- windows-latest
28+
args:
29+
- ""
30+
- "-F geo"
31+
runs-on: ${{ matrix.os }}
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: Set up Rust cache
35+
uses: Swatinem/rust-cache@v2
36+
- name: Test
37+
run: cargo test ${{ matrix.args }}

.github/workflows/async.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI (async)
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- async/**
7+
8+
defaults:
9+
run:
10+
working-directory: async
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
env:
17+
CARGO_TERM_COLOR: always
18+
CARGO_TERM_VERBOSE: true
19+
20+
jobs:
21+
test:
22+
strategy:
23+
matrix:
24+
os:
25+
- ubuntu-latest
26+
- macos-latest
27+
- windows-latest
28+
runs-on: ${{ matrix.os }}
29+
steps:
30+
- uses: actions/checkout@v4
31+
- name: Set up Rust cache
32+
uses: Swatinem/rust-cache@v2
33+
- name: Test
34+
run: cargo test

.github/workflows/ci.yml

Lines changed: 2 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,7 @@ env:
1515
CARGO_TERM_VERBOSE: true
1616

1717
jobs:
18-
test-ubuntu:
19-
runs-on: ubuntu-latest
20-
strategy:
21-
matrix:
22-
args:
23-
- "-p stac"
24-
- "-p stac -F reqwest"
25-
- "-p stac -F geoarrow"
26-
- "-p stac -F geoparquet"
27-
- "-p stac -F geoparquet-compression"
28-
- "-p stac-api"
29-
- "-p stac -p stac-api -F geo"
30-
- "-p stac-async"
31-
- "-p stac-cli --no-default-features"
32-
- "-p stac-cli --no-default-features -F geoparquet"
33-
- "-p stac-duckdb -F duckdb/bundled"
34-
- "-p stac-server"
35-
- "-p stac-server -F axum"
36-
- "-p stac-validate"
37-
steps:
38-
- uses: actions/checkout@v4
39-
- name: Set up Rust cache
40-
uses: Swatinem/rust-cache@v2
41-
- name: Test
42-
run: cargo test ${{ matrix.args }}
43-
test-ubuntu-with-gdal:
18+
test:
4419
runs-on: ubuntu-latest
4520
steps:
4621
- uses: actions/checkout@v4
@@ -50,74 +25,7 @@ jobs:
5025
sudo apt-get update
5126
sudo apt-get install libgdal-dev
5227
- name: Test
53-
run: cargo test -p stac -p stac-duckdb -p stac-cli --all-features -F duckdb/bundled
54-
test-ubuntu-with-pgstac:
55-
runs-on: ubuntu-latest
56-
services:
57-
pgstac:
58-
image: ghcr.io/stac-utils/pgstac:v0.8.6
59-
env:
60-
POSTGRES_USER: username
61-
POSTGRES_PASSWORD: password
62-
POSTGRES_DB: postgis
63-
PGUSER: username
64-
PGPASSWORD: password
65-
PGDATABASE: postgis
66-
ports:
67-
- 5432:5432
68-
steps:
69-
- uses: actions/checkout@v4
70-
- uses: Swatinem/rust-cache@v2
71-
- name: Test
72-
run: cargo test -p pgstac
73-
test-windows:
74-
runs-on: windows-latest
75-
steps:
76-
- uses: actions/checkout@v4
77-
- uses: Swatinem/rust-cache@v2
78-
- name: Test
79-
run: cargo test --no-default-features -F reqwest -F geo
80-
test-macos:
81-
runs-on: macos-latest
82-
steps:
83-
- uses: actions/checkout@v4
84-
- uses: Swatinem/rust-cache@v2
85-
- name: Test
86-
run: cargo test --no-default-features -F reqwest -F geo
87-
test-python:
88-
runs-on: ubuntu-latest
89-
steps:
90-
- uses: actions/checkout@v4
91-
- uses: Swatinem/rust-cache@v2
92-
- uses: actions/setup-python@v5
93-
with:
94-
python-version: 3.x
95-
- name: Install dev requirements
96-
run: pip install -r python/requirements-dev.txt
97-
- name: Build
98-
run: maturin build --manifest-path python/Cargo.toml --out dist
99-
- name: Install stacrs
100-
run: pip install stacrs --find-links dist --no-index
101-
- name: Check
102-
run: ruff check python && ruff format --check python && mypy python
103-
- name: Test
104-
run: pytest python/tests
105-
test-python-cli:
106-
runs-on: ubuntu-latest
107-
steps:
108-
- uses: actions/checkout@v4
109-
- uses: Swatinem/rust-cache@v2
110-
- uses: actions/setup-python@v5
111-
with:
112-
python-version: 3.x
113-
- name: Install dev requirements
114-
run: pip install maturin
115-
- name: Build
116-
run: maturin build --manifest-path cli/Cargo.toml --out dist
117-
- name: Install stacrs-cli
118-
run: pip install stacrs-cli --find-links dist --no-index
119-
- name: Smoke test
120-
run: stacrs --version
28+
run: cargo test --lib
12129
check:
12230
runs-on: ubuntu-latest
12331
steps:

.github/workflows/cli.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI (cli)
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- cli/**
7+
8+
defaults:
9+
run:
10+
working-directory: cli
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
env:
17+
CARGO_TERM_COLOR: always
18+
CARGO_TERM_VERBOSE: true
19+
20+
jobs:
21+
test:
22+
strategy:
23+
matrix:
24+
os:
25+
- ubuntu-latest
26+
- macos-latest
27+
- windows-latest
28+
args:
29+
- "--no-default-features"
30+
- "--no-default-features -F geoparquet"
31+
- "--no-default-features -F pgstac"
32+
- "--no-default-features -F python"
33+
runs-on: ${{ matrix.os }}
34+
steps:
35+
- uses: actions/checkout@v4
36+
- name: Set up Rust cache
37+
uses: Swatinem/rust-cache@v2
38+
- name: Test
39+
run: cargo test ${{ matrix.args }}
40+
test-with-gdal:
41+
runs-on: ubuntu-latest
42+
strategy:
43+
matrix:
44+
args:
45+
- "--no-default-features -F gdal"
46+
- ""
47+
steps:
48+
- uses: actions/checkout@v4
49+
- uses: Swatinem/rust-cache@v2
50+
- name: Install GDAL
51+
run: |
52+
sudo apt-get update
53+
sudo apt-get install libgdal-dev
54+
- name: Test
55+
run: cargo test ${{ matrix.args }}

.github/workflows/core.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI (core)
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- core/**
7+
8+
defaults:
9+
run:
10+
working-directory: core
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
env:
17+
CARGO_TERM_COLOR: always
18+
CARGO_TERM_VERBOSE: true
19+
20+
jobs:
21+
test:
22+
strategy:
23+
matrix:
24+
os:
25+
- ubuntu-latest
26+
- macos-latest
27+
- windows-latest
28+
args:
29+
- ""
30+
- "-F geo"
31+
- "-F geoarrow"
32+
- "-F geoparquet"
33+
- "-F geoparquet-compression"
34+
- "-F reqwest"
35+
runs-on: ${{ matrix.os }}
36+
steps:
37+
- uses: actions/checkout@v4
38+
- name: Set up Rust cache
39+
uses: Swatinem/rust-cache@v2
40+
- name: Test
41+
run: cargo test ${{ matrix.args }}
42+
test-with-gdal:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v4
46+
- uses: Swatinem/rust-cache@v2
47+
- name: Install GDAL
48+
run: |
49+
sudo apt-get update
50+
sudo apt-get install libgdal-dev
51+
- name: Test
52+
run: cargo test -F gdal

.github/workflows/duckdb.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI (duckdb)
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- duckdb/**
7+
8+
defaults:
9+
run:
10+
working-directory: duckdb
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
env:
17+
CARGO_TERM_COLOR: always
18+
CARGO_TERM_VERBOSE: true
19+
20+
jobs:
21+
test:
22+
strategy:
23+
matrix:
24+
os:
25+
- ubuntu-latest
26+
- macos-latest
27+
- windows-latest
28+
runs-on: ${{ matrix.os }}
29+
steps:
30+
- uses: actions/checkout@v4
31+
- name: Set up Rust cache
32+
uses: Swatinem/rust-cache@v2
33+
- name: Test
34+
run: cargo test

.github/workflows/pgstac.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI (pgstac)
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- pgstac/**
7+
8+
defaults:
9+
run:
10+
working-directory: pgstac
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
env:
17+
CARGO_TERM_COLOR: always
18+
CARGO_TERM_VERBOSE: true
19+
20+
jobs:
21+
test:
22+
runs-on: ubuntu-latest
23+
services:
24+
pgstac:
25+
image: ghcr.io/stac-utils/pgstac:v0.8.6
26+
env:
27+
POSTGRES_USER: username
28+
POSTGRES_PASSWORD: password
29+
POSTGRES_DB: postgis
30+
PGUSER: username
31+
PGPASSWORD: password
32+
PGDATABASE: postgis
33+
ports:
34+
- 5432:5432
35+
steps:
36+
- uses: actions/checkout@v4
37+
- name: Set up Rust cache
38+
uses: Swatinem/rust-cache@v2
39+
- name: Test
40+
run: cargo test

0 commit comments

Comments
 (0)