Skip to content

Merge pull request #2333 from camptocamp/c2cciutils-upgrade-1.15 #4966

Merge pull request #2333 from camptocamp/c2cciutils-upgrade-1.15

Merge pull request #2333 from camptocamp/c2cciutils-upgrade-1.15 #4966

Workflow file for this run

name: Continuous integration
on:
push:
jobs:
main:
name: Continuous integration
runs-on: ubuntu-22.04
timeout-minutes: 15
if: "!startsWith(github.event.head_commit.message, '[skip ci] ')"
env:
REDIS_URL: redis://localhost:6379
steps:
- uses: actions/checkout@v1
- 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
if: github.repository == 'camptocamp/tilecloud-chain'
- run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
- run: python3 -m pip install --user --requirement=ci/requirements.txt
- name: Checks
run: c2cciutils-checks
- name: Build
run: |
python setup.py --long-description > PYPI.md
docker build --tag=camptocamp/tilecloud-chain:tests --target=tests .
docker build --tag=camptocamp/tilecloud-chain .
git --no-pager diff --check `git log --oneline | tail -1 | cut --fields=1 --delimiter=' '`
- name: Test
run: |
docker-compose up -d
# Wait for DB to be up
while ! docker-compose exec -T test psql -h db -p 5432 -U postgres -v ON_ERROR_STOP=1 -c "SELECT 1" -d tests
do
echo "Waiting for DB to be UP"
sleep 1
done
docker-compose exec -T test pytest
- run: docker-compose logs
if: always()
- run: docker-compose down
- name: Publish
run: c2cciutils-publish
- run: git diff --exit-code --patch > /tmp/dpkg-versions.patch || true
if: failure()
- uses: actions/upload-artifact@v4
with:
name: Update dpkg versions list.patch
path: /tmp/dpkg-versions.patch
retention-days: 1
if: failure()