-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from actinia-org/linting
Add mundialis linting workflow
- Loading branch information
Showing
36 changed files
with
309 additions
and
208 deletions.
There are no files selected for viewing
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: Linting and code quality check | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint: | ||
uses: mundialis/github-workflows/.github/workflows/linting.yml@main | ||
with: | ||
# set pylint-version to empty string to skip the pylint workflow | ||
pylint-version: '' | ||
BASH_SEVERITY: 'warning' | ||
VALIDATE_DOCKERFILE_HADOLINT: false | ||
VALIDATE_JSON: false | ||
VALIDATE_HTML: false | ||
VALIDATE_CSS: false | ||
VALIDATE_BASH_EXEC: false |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
name: Upload Python Package | ||
|
||
on: | ||
|
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,36 @@ | ||
--- | ||
name: actinia tests | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
branches: [main] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ main ] | ||
branches: [main] | ||
|
||
# only one run per PR/branch happens at a time, cancelling the old run when a new one starts | ||
# only one run per PR/branch happens at a time, cancelling the old run when a | ||
# new one starts | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
# with: | ||
# path: "." | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Tests of actinia-module-plugin | ||
id: docker_build | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: false | ||
tags: actinia-module-plugin-test:alpine | ||
context: . | ||
file: docker/actinia-module-plugin-test/Dockerfile | ||
no-cache: true | ||
# pull: true | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
# with: | ||
# path: "." | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Tests of actinia-module-plugin | ||
id: docker_build | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: false | ||
tags: actinia-module-plugin-test:alpine | ||
context: . | ||
file: docker/actinia-module-plugin-test/Dockerfile | ||
no-cache: true | ||
# pull: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
FROM mundialis/actinia:latest as actinia_test | ||
FROM mundialis/actinia:latest AS actinia_test | ||
|
||
LABEL authors="Carmen Tawalika,Anika Weinmann" | ||
LABEL maintainer="[email protected],[email protected]" | ||
|
||
ENV ACTINIA_CUSTOM_TEST_CFG /etc/default/actinia-module-plugin-test | ||
ENV ACTINIA_CUSTOM_TEST_CFG=/etc/default/actinia-module-plugin-test | ||
|
||
# TODO do not set DEFAULT_CONFIG_PATH if this is fixed | ||
ENV DEFAULT_CONFIG_PATH /etc/default/actinia-module-plugin-test | ||
ENV DEFAULT_CONFIG_PATH=/etc/default/actinia-module-plugin-test | ||
# set TEMPLATE_VALUE_ for testing | ||
ENV TEMPLATE_VALUE_ENV_RASTER elevation | ||
ENV TEMPLATE_VALUE_ENV_TYPE raster | ||
ENV TEMPLATE_VALUE_ENV_RASTER=elevation | ||
ENV TEMPLATE_VALUE_ENV_TYPE=raster | ||
|
||
# install things only for tests | ||
RUN apk add redis | ||
RUN pip install --upgrade setuptools | ||
RUN pip install pytest pytest-cov pwgen | ||
RUN apk add --no-cache redis | ||
RUN pip install --upgrade setuptools && pip install pytest pytest-cov pwgen | ||
|
||
ENTRYPOINT ["/bin/sh"] | ||
CMD ["/src/start.sh"] | ||
|
||
RUN pip uninstall actinia-module-plugin.wsgi -y | ||
RUN pip uninstall actinia-module-plugin -y | ||
RUN pip uninstall actinia-module-plugin.wsgi actinia-module-plugin -y | ||
|
||
# add data for tests | ||
RUN grass -e -c 'EPSG:3358' /actinia_core/grassdb/nc_spm_08 | ||
|
@@ -30,13 +28,13 @@ RUN grass -e -c 'EPSG:3358' /actinia_core/grassdb/nc_spm_08 | |
# mv nc_spm_08_micro /actinia_core/grassdb/nc_spm_08 | ||
# RUN grass -e -c 'EPSG:4326' /actinia_core/grassdb/latlong_wgs84 | ||
|
||
WORKDIR /src/actinia-module-plugin/ | ||
|
||
# copy needed files and configs for test | ||
COPY docker/actinia-module-plugin-test/actinia-module-plugin-test.cfg /etc/default/actinia | ||
COPY docker/actinia-module-plugin-test/actinia-module-plugin-test.cfg /etc/default/actinia-module-plugin-test | ||
COPY . /src/actinia-module-plugin/ | ||
|
||
WORKDIR /src/actinia-module-plugin/ | ||
|
||
RUN chmod a+x tests_with_redis.sh | ||
RUN pip install . | ||
|
||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"config:base" | ||
"config:recommended" | ||
] | ||
} |
Oops, something went wrong.