Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ jobs:
with:
persist-credentials: false

- uses: github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
- uses: github/codeql-action/init@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4.33.0
with:
languages: ${{ matrix.language }}

- uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
- uses: github/codeql-action/analyze@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4.33.0
with:
category: "/language:${{matrix.language}}"

Expand Down
41 changes: 27 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,23 @@ lint-fix: ## Execute linting and fix
-e FIX_SHELL_SHFMT=true \
)

setup: ## Install npm dependencies for all package.json files under actions/
@echo "Installing npm dependencies for all packages..."
$(call run_npm_for_packages,install)

npm-audit-fix: ## Execute npm audit fix
@set -uo pipefail; \
overall_status=0; \
packages="$$(find actions -type f -name package.json -not -path '*/node_modules/*' -print | sort)"; \
echo "Running npm audit fix for package.json files under actions/ ..."; \
for pkg in $$packages; do \
pkg_dir="$$(dirname "$$pkg")"; \
echo "---"; \
npm install --prefix "$$pkg_dir"; \
echo "npm audit fix in $$pkg_dir"; \
if ! npm --prefix "$$pkg_dir" audit fix; then \
overall_status=1; \
fi; \
done; \
exit $$overall_status
@echo "Running npm audit fix for all packages..."
$(call run_npm_for_packages,audit fix)

test: ## Execute tests
@echo "Running tests for all packages..."
$(call run_npm_for_packages,test)

ci: ## Execute CI tasks
$(MAKE) setup
$(MAKE) npm-audit-fix
$(MAKE) lint-fix
$(MAKE) test

define run_linter
DEFAULT_WORKSPACE="$(CURDIR)"; \
Expand All @@ -52,6 +50,21 @@ define run_linter
$$LINTER_IMAGE
endef

define run_npm_for_packages
@set -uo pipefail; \
overall_status=0; \
packages="$$(find actions -type f -name package.json -not -path '*/node_modules/*' -print | sort)"; \
for pkg in $$packages; do \
pkg_dir="$$(dirname "$$pkg")"; \
echo "---"; \
echo "npm $(1) in $$pkg_dir"; \
if ! npm --prefix "$$pkg_dir" $(1); then \
overall_status=1; \
fi; \
done; \
exit $$overall_status
endef

#############################
# Argument fix workaround
#############################
Expand Down
2 changes: 1 addition & 1 deletion actions/get-matrix-outputs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ runs:
}

- if: ${{ inputs.remove-artifact == 'true' }}
uses: geekyeggo/delete-artifact@f275313e70c08f6120db482d7a6b98377786765b # v5.1.0
uses: geekyeggo/delete-artifact@176a747ab7e287e3ff4787bf8a148716375ca118 # v6.0.0
with:
name: ${{ steps.prepare-download.outputs.artifact-name }}-*
Loading