-
Notifications
You must be signed in to change notification settings - Fork 8
84 lines (69 loc) · 2.22 KB
/
main.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
73
74
75
76
77
78
79
80
81
82
83
84
name: Continuous integration
on:
push:
env:
HAS_SECRETS: ${{ secrets.HAS_SECRETS }}
jobs:
main:
name: Continuous integration
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Install packages
run: sudo apt-get install --yes gettext libgeos-dev
- name: Install c2cciutils
run: |
echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
python3 -m pip install --user --requirement=ci/requirements.txt
- uses: actions/cache@v3
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
env:
SKIP: poetry-lock
- 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()
- name: Environment information
run: c2cciutils-env
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Build
run: make build
- name: Lint
run: make check
- name: Tests
run: make test
- name: Documentation
run: make docs
- name: Docker compose logs
run: |
c2cciutils-docker-logs
docker compose down -v --remove-orphans
if: always()
- 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
if: env.HAS_SECRETS == 'HAS_SECRETS'
- name: Publish
run: c2cciutils-publish
if: env.HAS_SECRETS == 'HAS_SECRETS'
- 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()