Skip to content

Fixed pre-commit errors #1

Fixed pre-commit errors

Fixed pre-commit errors #1

Workflow file for this run

---
name: Continuous integration
on:
push:
# To publish the images to be used on Kubernetes
env:
PROJECT: geogr_gmf
HAS_SECRETS: ${{ secrets.HAS_SECRETS }}
jobs:
main:
runs-on: ubuntu-24.04
name: Continuous integration
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
# To publish the images to be used on Kubernetes
- uses: camptocamp/initialise-gopass-summon-action@v2
with:
ci-gpg-private-key: ${{ secrets.CI_GPG_PRIVATE_KEY }}
github-gopass-ci-token: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }}
patterns: docker
if: env.HAS_SECRETS == 'HAS_SECRETS'
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: python3 -m pip install --requirement=ci/requirements.txt
- name: Environment information
run: c2cciutils-env
- 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'
- 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 && false
if: failure()
# - name: Initialize the acceptance tests
# run: make acceptance-init
# - run: c2cciutils-docker-logs
# if: always()
# - name: Run the acceptance tests
# run: make acceptance
# - run: c2cciutils-docker-logs
# if: always()
- name: Build
run: ./build
- name: Application checks
run: make checks
# To publish the images to be used on Kubernetes
- name: Publish
run: c2cciutils-publish