Snyk auto fix #4366
Workflow file for this run
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: Continuous integration | |
on: | |
push: | |
jobs: | |
main: | |
runs-on: ubuntu-22.04 | |
name: Continuous integration | |
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 | |
docker-compose down | |
- run: docker-compose logs | |
if: failure() | |
- name: Publish | |
run: c2cciutils-publish |