Skip to content

Commit fd3f9ee

Browse files
authored
fix: ci (#31)
* fix: ci * fix: action versions * fix: add libqlite to package * ci: try relaxing reqs * fix: nope, make sure python is from conda forge
1 parent f092a7a commit fd3f9ee

File tree

17 files changed

+16
-479
lines changed

17 files changed

+16
-479
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 5 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -6,131 +6,36 @@ on:
66
- main
77
pull_request:
88

9-
env:
10-
DOCKER_REGISTRY: ghcr.io
11-
DOCKER_IMAGE_NAME: ${{ github.repository }}
12-
139
jobs:
14-
codecov:
15-
name: codecov
16-
runs-on: ubuntu-latest
17-
steps:
18-
- uses: actions/checkout@v2
19-
- name: Execute linters and test suites
20-
run: ./docker/cibuild
21-
- name: Upload All coverage to Codecov
22-
uses: codecov/codecov-action@v1
23-
with:
24-
token: ${{ secrets.CODECOV_TOKEN }}
25-
file: ./coverage.xml
26-
fail_ci_if_error: false
2710
python-matrix:
2811
name: python-matrix
2912
runs-on: ubuntu-latest
3013
strategy:
3114
matrix:
32-
python-version: ["3.8", "3.9", "3.10"]
15+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
3316
defaults:
3417
run:
3518
shell: bash -l {0}
3619
steps:
37-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
3821
- name: Set up conda cache
39-
uses: actions/cache@v2
22+
uses: actions/cache@v4
4023
with:
4124
path: ~/conda_pkgs_dir
4225
key: ${{ runner.os }}-conda-${{ hashFiles('**/environment.yml') }}
4326
restore-keys: ${{ runner.os }}-conda-
4427
- name: Set up pip cache
45-
uses: actions/cache@v2
28+
uses: actions/cache@v4
4629
with:
4730
path: ~/.cache/pip
4831
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.cfg', '**/requirements-dev.txt') }}
4932
restore-keys: ${{ runner.os }}-pip-
5033
- name: Set up Conda with Python ${{ matrix.python-version }}
51-
uses: conda-incubator/setup-miniconda@v2
34+
uses: conda-incubator/setup-miniconda@v3
5235
with:
5336
auto-update-conda: true
5437
python-version: ${{ matrix.python-version }}
5538
- name: Update Conda's environemnt
5639
run: conda env update -f environment.yml -n test
5740
- name: Execute linters and test suites
5841
run: ./scripts/cibuild
59-
docker:
60-
name: docker
61-
needs:
62-
- codecov
63-
- python-matrix
64-
permissions:
65-
contents: read
66-
packages: write
67-
runs-on: ubuntu-latest
68-
steps:
69-
- name: Set up Python 3.x
70-
uses: actions/setup-python@v2
71-
with:
72-
python-version: "3.x"
73-
- name: Checkout
74-
uses: actions/checkout@v2
75-
- name: Login to GitHub Container Registry
76-
uses: docker/login-action@v1
77-
with:
78-
registry: ${{ env.DOCKER_REGISTRY }}
79-
username: ${{ github.actor }}
80-
password: ${{ secrets.GITHUB_TOKEN }}
81-
- name: Run rename script if in the template repo
82-
run: |
83-
if [[ "$GITHUB_REPOSITORY" == */template ]]; then
84-
scripts/rename
85-
fi
86-
- name: Source build args
87-
run: |
88-
source ./docker_env
89-
STACTOOLS_VERSION=$(python scripts/stactools-version.py)
90-
echo "stactools_version=$STACTOOLS_VERSION" >> $GITHUB_ENV
91-
echo "docker_workdir=$DOCKER_WORKDIR" >> $GITHUB_ENV
92-
echo "docker_namespace_package_dir=$DOCKER_NAMESPACE_PACKAGE_DIR" >> $GITHUB_ENV
93-
- name: Docker meta main
94-
id: meta-main
95-
uses: docker/metadata-action@v3
96-
with:
97-
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}
98-
tags: |
99-
type=ref,event=branch
100-
type=ref,event=pr
101-
- name: Build and push main
102-
uses: docker/build-push-action@v2
103-
with:
104-
context: .
105-
file: docker/Dockerfile
106-
build-args: |
107-
STACTOOLS_VERSION=${{ env.stactools_version }}
108-
DOCKER_WORKDIR=${{ env.docker_workdir }}
109-
DOCKER_NAMESPACE_PACKAGE_DIR=${{ env.docker_namespace_package_dir }}
110-
# Don't try to push if the event is a PR from a fork
111-
push: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
112-
tags: ${{ steps.meta-main.outputs.tags }}
113-
labels: ${{ steps.meta-main.outputs.labels }}
114-
- name: Docker meta dev
115-
id: meta-dev
116-
uses: docker/metadata-action@v3
117-
with:
118-
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}
119-
flavor: |
120-
suffix=-dev
121-
tags: |
122-
type=ref,event=branch
123-
type=ref,event=pr
124-
- name: Build and push dev
125-
uses: docker/build-push-action@v2
126-
with:
127-
context: .
128-
file: docker/Dockerfile-dev
129-
build-args: |
130-
STACTOOLS_VERSION=${{ env.stactools_version }}
131-
DOCKER_WORKDIR=${{ env.docker_workdir }}
132-
DOCKER_NAMESPACE_PACKAGE_DIR=${{ env.docker_namespace_package_dir }}
133-
# Don't try to push if the event is a PR from a fork
134-
push: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
135-
tags: ${{ steps.meta-dev.outputs.tags }}
136-
labels: ${{ steps.meta-dev.outputs.labels }}

.github/workflows/release.yml

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ on:
55
tags:
66
- "*"
77

8-
env:
9-
DOCKER_REGISTRY: ghcr.io
10-
DOCKER_IMAGE_NAME: ${{ github.repository }}
11-
128
jobs:
139
release:
1410
name: release
@@ -32,83 +28,3 @@ jobs:
3228
TWINE_PASSWORD: ${{ secrets.PYPI_STACUTILS_PASSWORD }}
3329
run: |
3430
scripts/publish
35-
docker:
36-
name: docker
37-
permissions:
38-
contents: read
39-
packages: write
40-
runs-on: ubuntu-latest
41-
steps:
42-
- name: Set up Python 3.x
43-
uses: actions/setup-python@v2
44-
with:
45-
python-version: "3.x"
46-
-
47-
name: Checkout
48-
uses: actions/checkout@v2
49-
-
50-
name: Login to GitHub Container Registry
51-
uses: docker/login-action@v1
52-
with:
53-
registry: ${{ env.DOCKER_REGISTRY }}
54-
username: ${{ github.actor }}
55-
password: ${{ secrets.GITHUB_TOKEN }}
56-
- name: Source build args
57-
run: |
58-
source ./docker_env
59-
STACTOOLS_VERSION=$(python scripts/stactools-version.py)
60-
echo "stactools_version=$STACTOOLS_VERSION" >> $GITHUB_ENV
61-
echo "docker_workdir=$DOCKER_WORKDIR" >> $GITHUB_ENV
62-
echo "docker_namespace_package_dir=$DOCKER_NAMESPACE_PACKAGE_DIR" >> $GITHUB_ENV
63-
- name: Run rename script if in the template repo
64-
run: |
65-
if [[ "$GITHUB_REPOSITORY" == */template ]]; then
66-
scripts/rename
67-
fi
68-
-
69-
name: Docker meta main
70-
id: meta-main
71-
uses: docker/metadata-action@v3
72-
with:
73-
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}
74-
flavor: |
75-
latest=true
76-
tags: |
77-
type=pep440,pattern={{version}}
78-
-
79-
name: Build and push main
80-
uses: docker/build-push-action@v2
81-
with:
82-
context: .
83-
file: docker/Dockerfile
84-
build-args: |
85-
STACTOOLS_VERSION=${{ env.stactools_version }}
86-
DOCKER_WORKDIR=${{ env.docker_workdir }}
87-
DOCKER_NAMESPACE_PACKAGE_DIR=${{ env.docker_namespace_package_dir }}
88-
push: true
89-
tags: ${{ steps.meta-main.outputs.tags }}
90-
labels: ${{ steps.meta-main.outputs.labels }}
91-
-
92-
name: Docker meta dev
93-
id: meta-dev
94-
uses: docker/metadata-action@v3
95-
with:
96-
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}
97-
flavor: |
98-
latest=true
99-
suffix=-dev,onlatest=true
100-
tags: |
101-
type=pep440,pattern={{version}}
102-
-
103-
name: Build and push dev
104-
uses: docker/build-push-action@v2
105-
with:
106-
context: .
107-
file: docker/Dockerfile-dev
108-
build-args: |
109-
STACTOOLS_VERSION=${{ env.stactools_version }}
110-
DOCKER_WORKDIR=${{ env.docker_workdir }}
111-
DOCKER_NAMESPACE_PACKAGE_DIR=${{ env.docker_namespace_package_dir }}
112-
push: true
113-
tags: ${{ steps.meta-dev.outputs.tags }}
114-
labels: ${{ steps.meta-dev.outputs.labels }}

.pre-commit-config.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,33 @@
33

44
repos:
55
- repo: https://github.com/psf/black
6-
rev: 22.12.0
6+
rev: 25.1.0
77
hooks:
88
- id: black
99
- repo: https://github.com/codespell-project/codespell
10-
rev: v2.2.2
10+
rev: v2.4.1
1111
hooks:
1212
- id: codespell
1313
args: [--ignore-words=.codespellignore]
1414
types_or: [jupyter, markdown, python, shell]
1515
- repo: https://github.com/PyCQA/flake8
16-
rev: 6.0.0
16+
rev: 7.2.0
1717
hooks:
1818
- id: flake8
1919
- repo: https://github.com/pre-commit/mirrors-mypy
20-
rev: v0.991
20+
rev: v1.15.0
2121
hooks:
2222
- id: mypy
2323
additional_dependencies:
2424
- click != 8.1.0
2525
- stactools
26+
- pystac < 1.12
27+
- pytest
2628
- repo: https://github.com/pycqa/isort
27-
rev: 5.11.4
29+
rev: 6.0.1
2830
hooks:
2931
- id: isort
3032
- repo: https://github.com/igorshubovych/markdownlint-cli
31-
rev: v0.33.0
33+
rev: v0.44.0
3234
hooks:
3335
- id: markdownlint

docker/Dockerfile

Lines changed: 0 additions & 17 deletions
This file was deleted.

docker/Dockerfile-dev

Lines changed: 0 additions & 22 deletions
This file was deleted.

docker/Dockerfile-script-runner

Lines changed: 0 additions & 9 deletions
This file was deleted.

docker/build

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)