-
Notifications
You must be signed in to change notification settings - Fork 13
72 lines (56 loc) · 1.89 KB
/
rebuild-115.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Rebuild 1.15
on:
schedule:
- cron: 30 2 * * *
jobs:
rebuild:
runs-on: ubuntu-24.04
name: Rebuild 1.15
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
branch:
- '1.15'
env:
REDIS_URL: redis://localhost:6379
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
- 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
- run: touch tilecloud_chain/OpenLayers.js
- 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: Start
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
timeout-minutes: 2
- name: Test
run: |
docker compose exec -T test pytest
docker compose down
- run: docker compose logs
if: failure()
- run: python3 -m pip install --requirement=requirements-publish.txt
- name: Publish
run: c2cciutils-publish --type=rebuild --branch=${{ matrix.branch }}