Skip to content

Commit 7eaab29

Browse files
committed
Clean all the images already present in the image given by GitHub
1 parent 4465d41 commit 7eaab29

File tree

1 file changed

+77
-76
lines changed

1 file changed

+77
-76
lines changed

.github/workflows/main.yaml

Lines changed: 77 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
---
21
name: Continuous integration
32

43
on:
54
pull_request:
65
push:
76
branches:
8-
- master
7+
- master
98
tags:
10-
- '*'
9+
- '*'
1110

1211
env:
1312
HAS_SECRETS: ${{ secrets.HAS_SECRETS }}
@@ -24,87 +23,89 @@ jobs:
2423
fail-fast: false
2524
matrix:
2625
python-version:
27-
- '3.8'
28-
- '3.9'
29-
- '3.10'
26+
- '3.8'
27+
- '3.9'
28+
- '3.10'
3029

3130
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()
6565

6666
build:
6767
name: Continuous integration
6868
runs-on: ubuntu-20.04
6969
timeout-minutes: 15
7070
if: "!startsWith(github.event.head_commit.message, '[skip ci] ')"
7171
needs:
72-
- test
72+
- test
7373

7474
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

Comments
 (0)