1
- ---
2
1
name : Continuous integration
3
2
4
3
on :
5
4
pull_request :
6
5
push :
7
6
branches :
8
- - master
7
+ - master
9
8
tags :
10
- - ' *'
9
+ - ' *'
11
10
12
11
env :
13
12
HAS_SECRETS : ${{ secrets.HAS_SECRETS }}
@@ -24,87 +23,89 @@ jobs:
24
23
fail-fast : false
25
24
matrix :
26
25
python-version :
27
- - ' 3.8'
28
- - ' 3.9'
29
- - ' 3.10'
26
+ - ' 3.8'
27
+ - ' 3.9'
28
+ - ' 3.10'
30
29
31
30
steps :
32
- - name : GitHub event
33
- run : echo ${GITHUB_EVENT} | python3 -m json.tool
34
- env :
35
- GITHUB_EVENT : ${{ toJson(github) }}
36
-
37
- - name : Set up Python ${{ matrix.python-version }}
38
- uses : actions/setup-python@v4
39
- with :
40
- python-version : ${{ matrix.python-version }}
41
-
42
- - uses : actions/checkout@v3
43
-
44
- - run : echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
45
- - run : python3 -m pip install --user $(grep poetry ci/requirements.txt)
46
- - run : poetry install --extras=debug_images
47
- - name : Versions
48
- run : |
49
- poetry --version
50
- python --version
51
- poetry run python --version
52
- [ "$(python3 --version)" == "$(poetry run python --version)" ]
53
-
54
- - run : |
55
- poetry run coverage run --source=deskew --module pytest --durations=0 --verbose --color=yes \
56
- --profile --profile-svg --junitxml=results/test-reports/junit.xml tests
57
- poetry run coverage report
58
- poetry run coverage html --directory=results/coverage
59
-
60
- - uses : actions/upload-artifact@v3
61
- with :
62
- name : Test results
63
- path : results
64
- if : always()
31
+ - run : docker system prune --all --force
32
+ - name : GitHub event
33
+ run : echo ${GITHUB_EVENT} | python3 -m json.tool
34
+ env :
35
+ GITHUB_EVENT : ${{ toJson(github) }}
36
+
37
+ - name : Set up Python ${{ matrix.python-version }}
38
+ uses : actions/setup-python@v4
39
+ with :
40
+ python-version : ${{ matrix.python-version }}
41
+
42
+ - uses : actions/checkout@v3
43
+
44
+ - run : echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
45
+ - run : python3 -m pip install --user $(grep poetry ci/requirements.txt)
46
+ - run : poetry install --extras=debug_images
47
+ - name : Versions
48
+ run : |
49
+ poetry --version
50
+ python --version
51
+ poetry run python --version
52
+ [ "$(python3 --version)" == "$(poetry run python --version)" ]
53
+
54
+ - run : |
55
+ poetry run coverage run --source=deskew --module pytest --durations=0 --verbose --color=yes \
56
+ --profile --profile-svg --junitxml=results/test-reports/junit.xml tests
57
+ poetry run coverage report
58
+ poetry run coverage html --directory=results/coverage
59
+
60
+ - uses : actions/upload-artifact@v3
61
+ with :
62
+ name : Test results
63
+ path : results
64
+ if : always()
65
65
66
66
build :
67
67
name : Continuous integration
68
68
runs-on : ubuntu-20.04
69
69
timeout-minutes : 15
70
70
if : " !startsWith(github.event.head_commit.message, '[skip ci] ')"
71
71
needs :
72
- - test
72
+ - test
73
73
74
74
steps :
75
- - name : GitHub event
76
- run : echo ${GITHUB_EVENT} | python3 -m json.tool
77
- env :
78
- GITHUB_EVENT : ${{ toJson(github) }}
79
- - uses : actions/checkout@v3
80
- with :
81
- token : ${{ secrets.TOKEN }}
82
- if : env.HAS_SECRETS == 'HAS_SECRETS'
83
- - uses : actions/checkout@v3
84
- if : env.HAS_SECRETS != 'HAS_SECRETS'
85
-
86
- - run : echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
87
- - run : python3 -m pip install --user --requirement=ci/requirements.txt
88
-
89
- - name : Checks
90
- run : c2cciutils-checks
91
-
92
- - run : poetry install --extras=debug_images
93
- - run : poetry run prospector --output=pylint --die-on-tool-error
94
-
95
- - name : Init Git
96
- run : |
97
- git config credential.helper 'cache --timeout=120'
98
- git config user.email "<[email protected] >"
99
- git config user.name "CI"
100
- if : env.HAS_SECRETS == 'HAS_SECRETS'
101
- - name : Init pypi
102
- run : |
103
- echo "[pypi]" > ~/.pypirc
104
- echo "username = ${{ secrets.PYPI_USERNAME }}" >> ~/.pypirc
105
- echo "password = ${{ secrets.PYPI_PASSWORD }}" >> ~/.pypirc
106
- python3 -m pip install --user wheel twine
107
- if : env.HAS_SECRETS == 'HAS_SECRETS'
108
- - name : Publish
109
- run : c2cciutils-publish
110
- if : env.HAS_SECRETS == 'HAS_SECRETS'
75
+ - run : docker system prune --all --force
76
+ - name : GitHub event
77
+ run : echo ${GITHUB_EVENT} | python3 -m json.tool
78
+ env :
79
+ GITHUB_EVENT : ${{ toJson(github) }}
80
+ - uses : actions/checkout@v3
81
+ with :
82
+ token : ${{ secrets.TOKEN }}
83
+ if : env.HAS_SECRETS == 'HAS_SECRETS'
84
+ - uses : actions/checkout@v3
85
+ if : env.HAS_SECRETS != 'HAS_SECRETS'
86
+
87
+ - run : echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
88
+ - run : python3 -m pip install --user --requirement=ci/requirements.txt
89
+
90
+ - name : Checks
91
+ run : c2cciutils-checks
92
+
93
+ - run : poetry install --extras=debug_images
94
+ - run : poetry run prospector --output=pylint --die-on-tool-error
95
+
96
+ - name : Init Git
97
+ run : |
98
+ git config credential.helper 'cache --timeout=120'
99
+ git config user.email "<[email protected] >"
100
+ git config user.name "CI"
101
+ if : env.HAS_SECRETS == 'HAS_SECRETS'
102
+ - name : Init pypi
103
+ run : |
104
+ echo "[pypi]" > ~/.pypirc
105
+ echo "username = ${{ secrets.PYPI_USERNAME }}" >> ~/.pypirc
106
+ echo "password = ${{ secrets.PYPI_PASSWORD }}" >> ~/.pypirc
107
+ python3 -m pip install --user wheel twine
108
+ if : env.HAS_SECRETS == 'HAS_SECRETS'
109
+ - name : Publish
110
+ run : c2cciutils-publish
111
+ if : env.HAS_SECRETS == 'HAS_SECRETS'
0 commit comments