Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI/CD updates #9

Merged
merged 66 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
3986103
CI: add nix package build test (#3906)
imincik Jun 27, 2024
ab79e43
CI(deps): Pin dependencies (#3932)
renovate[bot] Jun 27, 2024
6748067
CI: Initial code coverage configuration with Codecov (#3905)
echoix Jun 27, 2024
cb0e431
r.horizon: change JSON format (#3888)
petrasovaa Jun 28, 2024
695e550
d.histogram: Initialize range_dmin and range_dmax to fix uninitialize…
ShubhamDesai Jun 28, 2024
fb52c5b
CI(deps): Update github/codeql-action action to v3.25.11 (#3938)
renovate[bot] Jun 28, 2024
9e87f51
CI(deps): Update dependency PDAL/PDAL to v2.7.2 (#3937)
renovate[bot] Jun 28, 2024
b5bfcd5
Checks: fix flake8 E741 in gui/wxpython directory (#3926)
mshukuno Jun 29, 2024
3738001
d.histogram: Fix dead store warnings in bar.c (#3927)
ShubhamDesai Jun 30, 2024
386d478
style: Fixes unnecessary-collection-call (C408) for remaining code (#…
echoix Jul 1, 2024
85b047f
style: Fixes manual-from-import (PLR0402) (#3949)
echoix Jul 1, 2024
837b796
style: Fixes unnecessary-collection-call (C408) for testsuite (#3947)
echoix Jul 1, 2024
ce1a43c
style: Fixes if-stmt-min-max (PLR1730) (#3950)
echoix Jul 1, 2024
2ae07bc
style(gui): Fixes literal-membership (PLR6201) (#3952)
echoix Jul 1, 2024
614e1e7
style(temporal): Fixes literal-membership (PLR6201) (#3953)
echoix Jul 1, 2024
ffa270b
style: Fixes literal-membership (PLR6201) for other code (#3954)
echoix Jul 1, 2024
a9d9dc4
style: Fixes sys-exit-alias (PLR1722) (#3951)
echoix Jul 1, 2024
7a1c8d9
docker: Downgrade PDAL to 2.7.1 in ubuntu_wxgui (#3946)
echoix Jul 1, 2024
2a048b2
style: Manual fixes for single-line-implicit-string-concatenation vio…
echoix Jul 1, 2024
a9f81f4
style: Fixes useless-return (PLR1711) (#3955)
echoix Jul 1, 2024
734c93d
style: Fixes useless-exception-statement (PLW0133) (#3957)
echoix Jul 1, 2024
4f1b897
style(temporal): Sort and group imports (#3959)
echoix Jul 1, 2024
e99f979
style: Fixes unnecessary-collection-call (C408) for empty collections…
echoix Jul 1, 2024
28bbce8
style: Fix single-line-implicit-string-concatenation violations (ISC0…
echoix Jul 1, 2024
939ed83
i.landsat.acca: Fix uninitialized variable issue (#3958)
ShubhamDesai Jul 1, 2024
7cf68ef
style: fix missing whitespace between operators (#3967)
echoix Jul 1, 2024
0cc7cbf
style: Fixes some unnecessary-lambda (PLW0108) (#3956)
echoix Jul 2, 2024
69c616c
raster: Fix uninitialized variable 'flowpq' in raster/r.terraflow/swe…
ShubhamDesai Jul 2, 2024
16b69e4
CI(deps): Update ubuntu:22.04 Docker digest to 340d9b0 (#3971)
renovate[bot] Jul 2, 2024
7f4aabf
r.profile: add JSON support (#3872)
kritibirda26 Jul 2, 2024
1a8cbec
Checks: fix flake8 E741 remainder (#3928)
mshukuno Jul 2, 2024
277a147
checks(ruff): Configure ruff linter (#3972)
echoix Jul 3, 2024
5513912
CI(deps): Update docker/build-push-action action to v6.3.0 (#3976)
renovate[bot] Jul 3, 2024
6424f9a
CI(deps): Update docker/setup-qemu-action action to v3.1.0 (#3977)
renovate[bot] Jul 3, 2024
71ed433
r.univar: add JSON support (#3783)
kritibirda26 Jul 3, 2024
cc75269
v.univar: add JSON support (#3784)
kritibirda26 Jul 3, 2024
56eaf9e
d.labels: Reduce scope of minreg and maxreg variables in main.c (#3979)
ShubhamDesai Jul 3, 2024
66c4df0
CI(deps): Update docker/setup-buildx-action action to v3.4.0 (#3982)
renovate[bot] Jul 4, 2024
79726a0
d.legend.vect: Reduce scope of 'bg_w' variable in draw.c (#3980)
ShubhamDesai Jul 4, 2024
cb1e9b3
lib: Fix uninitialized variable 'encoding' in parser_interface.c (#3975)
ShubhamDesai Jul 4, 2024
931e79a
CI(ruff): Fine tune posting Ruff suggestions (#3978)
echoix Jul 4, 2024
d880ec0
style: Fix unconventional-import-alias (ICN001) (consolidate `import …
echoix Jul 4, 2024
d1738f6
libvector/vedit: fix memory leaks (#3619)
nilason Jul 5, 2024
e4b3ddd
CI(deps): Update pre-commit hook astral-sh/ruff-pre-commit to v0.5.1 …
renovate[bot] Jul 5, 2024
6db6f81
CI(deps): Update dependency ruff to v0.5.1 (#3983)
renovate[bot] Jul 5, 2024
30f7a3c
CI(deps): Update actions/upload-artifact action to v4.3.4 (#3985)
renovate[bot] Jul 5, 2024
d528aa9
CI(deps): Update actions/download-artifact action to v4.1.8 (#3986)
renovate[bot] Jul 5, 2024
b432e42
CI(deps): Update rui314/setup-mold digest to 2e332a0 (#3989)
renovate[bot] Jul 6, 2024
559e088
i.segment: Fix uninitialized struct member 'ngbr_rc.next' in mean_shi…
ShubhamDesai Jul 6, 2024
1c3c303
lib: Fix uninitialized variable issue in shapiroe.c (#3994)
ShubhamDesai Jul 8, 2024
83f615a
i.segment: Fix uninitialized struct member error in region_growing.c …
ShubhamDesai Jul 8, 2024
ef69cb4
lib: Fixed uninitialized variable warning in dmax.c by initializing d…
ShubhamDesai Jul 8, 2024
c94708a
CI(deps): Update super-linter/super-linter action to v6.7.0 (#4002)
renovate[bot] Jul 8, 2024
cd64472
style: Fix pylint pointless-statement (W0104) (#3996)
echoix Jul 8, 2024
e952443
style: Fix replace-stdout-stderr (UP022) (#4000)
echoix Jul 8, 2024
f62b46f
ps.map: Fix uninitialized variable issues in r_colortable.c (#4004)
ShubhamDesai Jul 9, 2024
7b72452
style: Fix if-expr-with-true-false (SIM210) and if-expr-with-false-tr…
echoix Jul 9, 2024
18d11ad
pytest: Mark tests using space_time_raster_dataset as needs_solo_run …
echoix Jul 9, 2024
2f5bed6
style: Fix python logging-related pylint and ruff warnings (#3998)
echoix Jul 9, 2024
4be87a1
style: Fix pylint try-except-raise (W0706) (#3997)
echoix Jul 9, 2024
f4a407f
style: Fix incorrect-dict-iterator (PERF102) (#4007)
echoix Jul 9, 2024
89762ec
style: Ignore multiple-with-statements (SIM117) for test files (#4008)
echoix Jul 9, 2024
acc3e38
style: Fix loop-variable-overrides-iterator (B020) (#4010)
echoix Jul 9, 2024
b73eae5
style: Fix not-in-test (E713) and not-is-test (E714) (#4011)
echoix Jul 9, 2024
3e8706d
raster: Fix uninitialized variable issue in o_var.c (#4005)
ShubhamDesai Jul 9, 2024
87b6ac0
raster3d: Fix uninitialized variable issue in main.c (#4006)
ShubhamDesai Jul 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
30 changes: 11 additions & 19 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ per-file-ignores =
doc/python/vector_example_ctypes.py: F403, F405
doc/python/m.distance.py: F403, F405, E501
doc/gui/wxpython/example/dialogs.py: F401
locale/grass_po_stats.py: E122, E128, E231, E401, E722, E741
locale/grass_po_stats.py: E122, E128, E231, E401, E722
gui/scripts/d.wms.py: E501
gui/wxpython/core/gcmd.py: E402
gui/wxpython/core/gthread.py: F841
Expand Down Expand Up @@ -71,8 +71,7 @@ per-file-ignores =
gui/wxpython/gui_core/widgets.py: F841, E722, E266
gui/wxpython/image2target/*: F841, E722, E265
gui/wxpython/image2target/g.gui.image2target.py: E501, E265, F841
gui/wxpython/iscatt/*: F841, E722, E741, F405, F403
gui/wxpython/lmgr/giface.py: E741
gui/wxpython/iscatt/*: F841, E722, F405, F403
gui/wxpython/lmgr/frame.py: F841, E722
# layertree still includes some formatting issues (it is ignored by Black)
gui/wxpython/lmgr/layertree.py: E722, E266, W504, E225
Expand All @@ -82,16 +81,15 @@ per-file-ignores =
gui/wxpython/photo2image/*: F841, E722, E265
gui/wxpython/photo2image/g.gui.photo2image.py: E501, F841
gui/wxpython/psmap/*: F841, E266, E722, F405, F403
gui/wxpython/vdigit/*: F841, E722, E741, F405, F403
gui/wxpython/vdigit/*: F841, E722, F405, F403
gui/wxpython/vnet/*: F841
gui/wxpython/wxgui.py: F841
gui/wxpython/animation/g.gui.animation.py: E501
gui/wxpython/animation/mapwindow.py: F841
gui/wxpython/animation/provider.py: F841
gui/wxpython/tplot/frame.py: F841, E722, E741
gui/wxpython/tplot/frame.py: F841, E722
gui/wxpython/tplot/g.gui.tplot.py: E501
gui/wxpython/rdigit/g.gui.rdigit.py: F841
gui/wxpython/iclass/dialogs.py: E741
gui/wxpython/iclass/digit.py: F405, F403
gui/wxpython/iclass/frame.py: F405, F403
gui/wxpython/iclass/g.gui.iclass.py: E501
Expand All @@ -109,14 +107,12 @@ per-file-ignores =
gui/wxpython/mapwin/buffered.py: E722
gui/wxpython/mapwin/graphics.py: E722
gui/wxpython/startup/locdownload.py: E722, E402
gui/wxpython/timeline/g.gui.timeline.py: E501, E741
gui/wxpython/timeline/frame.py: E741
gui/wxpython/timeline/g.gui.timeline.py: E501
gui/wxpython/tools/build_modules_xml.py: E722
gui/wxpython/web_services/cap_interface.py: E501
gui/wxpython/web_services/widgets.py: F841, E741, E402
gui/wxpython/rlisetup/frame.py: E741
gui/wxpython/web_services/widgets.py: F841, E402
gui/wxpython/rlisetup/sampling_frame.py: F841
gui/wxpython/rlisetup/wizard.py: E722, E741
gui/wxpython/rlisetup/wizard.py: E722
# Generated file
gui/wxpython/menustrings.py: E501
# F821 undefined name 'cmp'
Expand All @@ -130,7 +126,6 @@ per-file-ignores =
python/grass/pygrass/vector/__init__.py: E402
python/grass/pygrass/modules/interface/*.py: F401
python/grass/pygrass/modules/grid/*.py: F401
python/grass/pygrass/raster/rowio.py: E741
python/grass/pygrass/raster/category.py: E721
python/grass/pygrass/rpc/__init__.py: F401, F403
python/grass/pygrass/utils.py: E402
Expand All @@ -140,13 +135,11 @@ per-file-ignores =
python/grass/temporal/datetime_math.py: F841, E722
python/grass/temporal/open_stds.py: F841
python/grass/temporal/spatial_topology_dataset_connector.py: E722
python/grass/temporal/temporal_algebra.py: E741, F841, E722
python/grass/temporal/temporal_algebra.py: F841, E722
python/grass/temporal/temporal_granularity.py: F841, E722
python/grass/temporal/temporal_raster_algebra.py: E741
python/grass/temporal/temporal_raster_base_algebra.py: F841, E722
python/grass/temporal/temporal_raster3d_algebra.py: E741
python/grass/temporal/temporal_topology_dataset_connector.py: E722
python/grass/temporal/temporal_vector_algebra.py: E741, F841
python/grass/temporal/temporal_vector_algebra.py: F841
python/grass/temporal/univar_statistics.py: E231
# Current benchmarks/tests are changing sys.path before import.
# Possibly, a different approach should be taken there anyway.
Expand All @@ -165,7 +158,7 @@ per-file-ignores =
# E402 module level import not at top of file
scripts/d.polar/d.polar.py: F841
scripts/r.in.wms/wms_gdal_drv.py: F841, E722
scripts/r.in.wms/wms_cap_parsers.py: F841, E741
scripts/r.in.wms/wms_cap_parsers.py: F841
scripts/r.in.wms/wms_drv.py: E402, E722
scripts/r.in.wms/srs.py: E722
scripts/r.semantic.label/r.semantic.label.py: F841, E501
Expand All @@ -174,8 +167,7 @@ per-file-ignores =
scripts/g.extension/g.extension.py: F841, E722, E501
scripts/v.unpack/v.unpack.py: F841, E722, E501
scripts/v.import/v.import.py: F841, E722, E501
scripts/db.univar/db.univar.py: E741, E501
scripts/d.rast.leg/d.rast.leg.py: E741
scripts/db.univar/db.univar.py: E501
scripts/d.frame/d.frame.py: E722
scripts/i.pansharpen/i.pansharpen.py: E722, E501
scripts/r.in.srtm/r.in.srtm.py: E722
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/create-upload-suggestions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ runs:
echo "diff-file-name=${INPUT_DIFF_FILE_NAME}" >> "${GITHUB_OUTPUT}"
env:
INPUT_DIFF_FILE_NAME: ${{ steps.tool-name-safe.outputs.diff-file-name }}
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
id: upload-diff
if: >-
${{ (steps.files_changed.outputs.files_changed == 'true') &&
Expand All @@ -200,7 +200,7 @@ runs:
echo 'Suggestions can only be added near to lines changed in this PR.'
echo 'If any fixes can be added as code suggestions, they will be added shortly from another workflow.'
} >> "${GITHUB_STEP_SUMMARY}"
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
id: upload-changes
if: >-
${{ always() &&
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ jobs:
sudo apt-get install -y wget git gawk findutils
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
- uses: rui314/setup-mold@65685f45207903d37d006cd402c397653c57660e # v1
- uses: rui314/setup-mold@2e332a0b602c2fc65d2d3995941b1b29a5f554a0 # v1
if: ${{ matrix.language == 'c-cpp' }}

- name: Initialize CodeQL
uses: github/codeql-action/init@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10
uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
Expand All @@ -81,6 +81,6 @@ jobs:
run: .github/workflows/build_ubuntu-22.04.sh "${HOME}/install"

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10
uses: github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
with:
category: "/language:${{matrix.language}}"
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ jobs:
latest=false
suffix=-${{ matrix.os }}
- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0
- name: Login to DockerHub
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0
with:
push: true
pull: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
nc_spm_full_v2alpha2.tar.gz"
- name: Make HTML test report available
if: ${{ always() }}
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: testreport-macOS
path: testreport
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/osgeo4w.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:

- name: Make HTML test report available
if: ${{ always() }}
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: testreport-${{ matrix.os }}
path: testreport
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/post-pr-reviews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- name: Create a .git directory needed by reviewdog
run: git init
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
id: diff
continue-on-error: true
with:
Expand Down Expand Up @@ -47,6 +47,7 @@ jobs:
INPUT_TOOL_NAMES: >-
black
clang-format
ruff
- name: Post Black suggestions
if: ${{ steps.tools.outputs.black == 'true' }}
run: |
Expand Down Expand Up @@ -83,3 +84,21 @@ jobs:
CI_REPO_OWNER: ${{ github.event.workflow_run.repository.owner.login }}
CI_REPO_NAME: ${{ github.event.workflow_run.repository.name }}
# CI_PULL_REQUEST: "" # Populated from reviewdog's "-guess" flag since hard to get
- name: Post Ruff suggestions
if: ${{ steps.tools.outputs.ruff == 'true' }}
run: |
TMPFILE="diff-${INPUT_TOOL_NAME}.patch"
GITHUB_ACTIONS="" reviewdog \
-name="${INPUT_TOOL_NAME:-reviewdog-suggester}" \
-f=diff \
-f.diff.strip=1 \
-filter-mode=nofilter \
-guess \
-reporter="github-pr-review" < "${TMPFILE}"
env:
INPUT_TOOL_NAME: ruff
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI_COMMIT: ${{ github.event.workflow_run.head_sha }}
CI_REPO_OWNER: ${{ github.event.workflow_run.repository.owner.login }}
CI_REPO_NAME: ${{ github.event.workflow_run.repository.name }}
# CI_PULL_REQUEST: "" # Populated from reviewdog's "-guess" flag since hard to get
20 changes: 15 additions & 5 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ jobs:
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests

- uses: rui314/setup-mold@65685f45207903d37d006cd402c397653c57660e # v1
- uses: rui314/setup-mold@2e332a0b602c2fc65d2d3995941b1b29a5f554a0 # v1

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r .github/workflows/python_requirements.txt
pip install -r .github/workflows/optional_requirements.txt
pip install pytest pytest-timeout pytest-github-actions-annotate-failures pytest-xdist
pip install pytest pytest-timeout pytest-github-actions-annotate-failures pytest-xdist pytest-cov

- name: Create installation directory
run: |
Expand All @@ -70,6 +70,10 @@ jobs:
run: |
echo "$HOME/install/bin" >> $GITHUB_PATH

- name: Print installed versions
if: always()
run: .github/workflows/print_versions.sh

- name: Test executing of the grass command
run: .github/workflows/test_simple.sh

Expand All @@ -86,12 +90,18 @@ jobs:
export PYTHONPATH=`grass --config python_path`:$PYTHONPATH
export LD_LIBRARY_PATH=$(grass --config path)/lib:$LD_LIBRARY_PATH
pytest --verbose --color=yes --durations=0 --durations-min=0.5 \
--cov \
-ra . \
-m 'needs_solo_run'

- name: Print installed versions
if: always()
run: .github/workflows/print_versions.sh
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
verbose: true
flags: pytest-python-${{ matrix.python-version }}
name: pytest-python-${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}

pytest-success:
name: pytest Result
needs:
Expand Down
26 changes: 22 additions & 4 deletions .github/workflows/python-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
PYLINT_VERSION: "2.12.2"
# renovate: datasource=pypi depName=bandit
BANDIT_VERSION: "1.7.9"
# renovate: datasource=pypi depName=ruff
RUFF_VERSION: "0.5.1"

runs-on: ${{ matrix.os }}
permissions:
Expand All @@ -50,6 +52,7 @@ jobs:
echo Flake8: ${{ env.FLAKE8_VERSION }}
echo Pylint: ${{ env.PYLINT_VERSION }}
echo Bandit: ${{ env.BANDIT_VERSION }}
echo Ruff: ${{ env.RUFF_VERSION }}

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

Expand All @@ -61,6 +64,21 @@ jobs:
- name: Upgrade pip
run: python -m pip install --upgrade pip

- name: Install Ruff
run: pip install ruff==${{ env.RUFF_VERSION }}
- name: Run Ruff
run: ruff check --output-format=github . --preview --fix --unsafe-fixes
- name: Create and uploads code suggestions to apply for Ruff
# Will fail fast here if there are changes required
id: diff-ruff
# To run after ruff step exits with failure when rules don't have fixes available
if: ${{ !cancelled() }}
uses: ./.github/actions/create-upload-suggestions
with:
tool-name: ruff
# To keep repo's file structure in formatted changes artifact
extra-upload-changes: pyproject.toml

- name: Install Black only
run: pip install black[jupyter]==${{ env.BLACK_VERSION }}

Expand Down Expand Up @@ -108,13 +126,13 @@ jobs:
bandit -c pyproject.toml -iii -r . -f sarif -o bandit.sarif --exit-zero

- name: Upload Bandit Scan Results
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: bandit.sarif
path: bandit.sarif

- name: Upload SARIF File into Security Tab
uses: github/codeql-action/upload-sarif@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10
uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
with:
sarif_file: bandit.sarif

Expand All @@ -126,7 +144,7 @@ jobs:
run: |
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV

- uses: rui314/setup-mold@65685f45207903d37d006cd402c397653c57660e # v1
- uses: rui314/setup-mold@2e332a0b602c2fc65d2d3995941b1b29a5f554a0 # v1
- name: Build
run: .github/workflows/build_${{ matrix.os }}.sh $HOME/install

Expand Down Expand Up @@ -180,7 +198,7 @@ jobs:
cp -rp dist.$ARCH/docs/html/libpython sphinx-grass

- name: Make Sphinx documentation available
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: sphinx-grass
path: sphinx-grass
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
# list of files that changed across commits
fetch-depth: 0
- name: Lint code base
uses: super-linter/super-linter/slim@88ea3923a7e1f89dd485d079f6eb5f5e8f937589 # v6.6.0
uses: super-linter/super-linter/slim@3fe03abab2eafb293ace16d4a3b07aeabcb3f1a0 # v6.7.0
env:
DEFAULT_BRANCH: main
# To report GitHub Actions status checks
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/test-nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Nix package and environment

on:
schedule:
- cron: '0 1 * * 1'
push:
tags:
- '*'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

permissions: {}

jobs:
test-nix:
runs-on: ubuntu-22.04
permissions:
contents: read

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Install nix
uses: DeterminateSystems/nix-installer-action@7993355175c2765e5733dae74f3e0786fe0e5c4f # v12

- name: Setup cachix
uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
with:
name: osgeo-grass
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Build package
run: nix build -L --accept-flake-config .#grass

- name: Test development environment
run: nix develop --accept-flake-config --command echo OK
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:

- name: Make HTML test report available
if: ${{ always() }}
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: testreport-${{ matrix.os }}-${{ matrix.config }}-${{ matrix.extra-include }}
path: testreport
Expand Down
Loading
Loading