Rebuild 2.6 #1005
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
name: Rebuild 2.6 | |
on: | |
schedule: | |
- cron: '30 3 * * *' | |
jobs: | |
main: | |
runs-on: ubuntu-22.04 | |
name: Rebuild 2.6 | |
timeout-minutes: 70 | |
strategy: | |
fail-fast: false | |
matrix: | |
branch: | |
- '2.6' | |
env: | |
MAIN_BRANCH: 2.6 | |
MAJOR_VERSION: 2.6 | |
steps: | |
- run: '! ls BACKPORT_TODO' | |
- run: df -h | |
- run: docker system prune --all --force | |
- run: sudo rm -rf /usr/local/lib/android | |
- run: df -h | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ matrix.branch }} | |
fetch-depth: 0 | |
token: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }} | |
- 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: pypi docker transifex | |
if: github.repository == 'camptocamp/c2cgeoportal' | |
- run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH} | |
- run: python3 -m pip install --user --requirement=ci/requirements.txt | |
- name: Checks | |
run: c2cciutils-checks | |
- run: scripts/get-version --auto-increment --github | |
id: version | |
if: github.repository == 'camptocamp/c2cgeoportal' | |
- run: python3 -m pip install --user --requirement=requirements.txt | |
# Build images | |
- run: make build-runner | |
- run: make build-tools | |
- run: make checks | |
if: always() | |
- run: make build-config | |
# Build and lint QGIS images | |
- run: docker build --target=lint --build-arg=VERSION=3.16 docker/qgisserver | |
- run: QGIS_VERSION=3.16 make build-qgisserver | |
# Tests | |
- run: make preparetest | |
- run: docker compose logs --timestamps | |
if: failure() | |
# Similar to: make tests-commons | |
- run: > | |
ci/run-dc-logs docker compose exec -T tests | |
pytest --verbose --color=yes --junitxml=/tmp/commons.xml | |
/opt/c2cgeoportal/commons/tests | |
# Similar to: make tests-geoportal | |
- run: > | |
ci/run-dc-logs docker compose exec -T tests | |
pytest --verbose --color=yes --junitxml=/tmp/geoportal.xml | |
/opt/c2cgeoportal/geoportal/tests | |
# Similar to: make tests-admin | |
- run: > | |
ci/run-dc-logs docker compose exec -T tests | |
pytest --verbose --color=yes --junitxml=/tmp/admin.xml | |
/opt/c2cgeoportal/admin/tests | |
# Similar to: make tests-qgisserver | |
- run: > | |
ci/run-dc-logs docker compose exec -T qgisserver-tests | |
pytest --verbose --color=yes --junitxml=/tmp/qgis.xml | |
/src/tests/functional | |
- run: docker compose down | |
# Documentation | |
- run: > | |
docker build --tag=camptocamp/geomapfish-doc | |
--build-arg=MAJOR_VERSION=${MAJOR_VERSION} | |
--build-arg=MAIN_BRANCH=${MAIN_BRANCH} | |
doc | |
- name: Extract documentation | |
run: ci/extract-documentation artifacts/documentations/ | |
if: always() | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: Documentation | |
path: artifacts/documentations/ | |
if-no-files-found: ignore | |
retention-days: 5 | |
# Test App | |
- run: ci/test-app | |
- run: | | |
cd ${HOME}/workspace/testgeomapfishapp/ | |
for service in $(docker compose config --services) | |
do | |
docker compose logs ${service} | |
done | |
if: failure() | |
continue-on-error: true | |
- name: Init Git | |
run: | |
git remote set-url origin https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository | |
}} | |
- run: make build-tools | |
- run: make build-runner | |
- run: make build-config | |
- run: ci/create-new-project ${HOME}/workspace geomapfishapp | |
- run: (cd ${HOME}/workspace/geomapfishapp/; ./build) | |
- name: Publish feature branch | |
run: | | |
c2cciutils-publish --branch=${{ matrix.branch }} --type=rebuild | |
- run: > | |
docker run --rm --volume=/var/run/docker.sock:/var/run/docker.sock nate/dockviz | |
images --tree | |
if: always() | |
- run: docker images | |
if: always() | |
- run: docker system df | |
if: always() | |
- run: df -h | |
if: always() |