Skip to content

Commit

Permalink
Merge pull request #1379 from camptocamp/interrupted-upgrade-prod-2-9…
Browse files Browse the repository at this point in the history
…-master

Upgrade failed
  • Loading branch information
sbrunner authored Aug 8, 2024
2 parents f38d092 + 60918ea commit fecde01
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 32 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,24 @@ jobs:
- run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
- run: python3 -m pip install --user --requirement=ci/requirements.txt

- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: "pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}\npre-commit-"
- run: pre-commit run --all-files
- run: git diff --exit-code --patch > /tmp/pre-commit.patch || true
if: failure()
- uses: actions/upload-artifact@v4
with:
name: Apply pre-commit fix.patch
path: /tmp/pre-commit.patch
retention-days: 1
if: failure()

# Can be used to have some secrets (with mask)
# - run: make secrets
# - run: cat env.secrets |grep '^[# A-Z0-9_]\+='|sed -e 's/^[# A-Z0-9_]\+=\(.*\)/::add-mask::\1/g'
- run: touch env.secrets

- name: Checks
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/pre-commit.yaml

This file was deleted.

15 changes: 15 additions & 0 deletions CONST_create_template/.github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,21 @@ jobs:
- run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
- run: python3 -m pip install --user --requirement=ci/requirements.txt

- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: "pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}\npre-commit-"
- run: pre-commit run --all-files
- run: git diff --exit-code --patch > /tmp/pre-commit.patch || true
if: failure()
- uses: actions/upload-artifact@v4
with:
name: Apply pre-commit fix.patch
path: /tmp/pre-commit.patch
retention-days: 1
if: failure()

# Can be used to have some secrets (with mask)
# - run: make secrets
# - run: cat env.secrets |grep '^[# A-Z0-9_]\+='|sed -e 's/^[# A-Z0-9_]\+=\(.*\)/::add-mask::\1/g'
Expand Down
1 change: 1 addition & 0 deletions CONST_create_template/ci/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
c2cciutils[checks,publish]==1.6.22
pre-commit==3.8.0
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ checks: prospector eslint ## Runs the checks

.PHONY: prospector
prospector: ## Runs the Prospector checks
docker compose run --entrypoint= --no-deps --rm --volume=$(CURDIR)/geoportal:/app geoportal \
docker compose run --entrypoint= --rm --volume=$(CURDIR)/geoportal:/app geoportal \
prospector --output-format=pylint --die-on-tool-error

.PHONY: eslint
Expand Down
1 change: 1 addition & 0 deletions ci/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
c2cciutils[checks,publish]==1.6.22
pre-commit==3.8.0

0 comments on commit fecde01

Please sign in to comment.