Skip to content

Commit 57b0f47

Browse files
committed
ci: add docker/login-action
1 parent fbdf8b4 commit 57b0f47

File tree

1 file changed

+31
-28
lines changed

1 file changed

+31
-28
lines changed

.github/workflows/base-test.yml

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88

99
jobs:
1010
test:
11-
1211
runs-on: ubuntu-latest
1312
strategy:
1413
fail-fast: false
@@ -22,36 +21,40 @@ jobs:
2221

2322
name: ClickHouse${{ matrix.clickhouse-version }} Python${{ matrix.python-version }} Django${{ matrix.django-version }}
2423
steps:
25-
- name: Checkout repository
26-
uses: actions/checkout@v4
27-
- name: Set up Python ${{ matrix.python-version }}
28-
uses: actions/setup-python@v5
29-
with:
30-
python-version: ${{ matrix.python-version }}
31-
- name: Install dependencies
32-
run: pip install tox 'coveralls<3'
33-
- name: Lint code
34-
run: tox -e lint
35-
- name: Start clickhouse cluster
36-
run: CLICKHOUSE_VERSION=${{ matrix.clickhouse-version }} docker compose up -d --wait
37-
- name: Run test
38-
# Run tox using the version of Python in `PATH`
39-
run: tox -e py-django${{ matrix.django-version }}
40-
- name: Coveralls Parallel
41-
run: coveralls
42-
env:
43-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
COVERALLS_PARALLEL: true
45-
COVERALLS_FLAG_NAME: run-${{ join(matrix.*, '-') }}
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
- name: Install dependencies
31+
run: pip install tox 'coveralls<3'
32+
- name: Lint code
33+
run: tox -e lint
34+
- name: Login to Docker Hub
35+
uses: docker/login-action@v3
36+
with:
37+
username: ${{ secrets.DOCKERHUB_USERNAME }}
38+
password: ${{ secrets.DOCKERHUB_TOKEN }}
39+
- name: Start clickhouse cluster
40+
run: CLICKHOUSE_VERSION=${{ matrix.clickhouse-version }} docker compose up -d --wait
41+
- name: Run test
42+
# Run tox using the version of Python in `PATH`
43+
run: tox -e py-django${{ matrix.django-version }}
44+
- name: Coveralls Parallel
45+
run: coveralls
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
COVERALLS_PARALLEL: true
49+
COVERALLS_FLAG_NAME: run-${{ join(matrix.*, '-') }}
4650

4751
coveralls-finish:
48-
4952
needs: test
5053
if: ${{ always() }}
5154
runs-on: ubuntu-latest
5255
steps:
53-
- name: Coveralls Finished
54-
uses: coverallsapp/github-action@v2
55-
with:
56-
github-token: ${{ secrets.GITHUB_TOKEN }}
57-
parallel-finished: true
56+
- name: Coveralls Finished
57+
uses: coverallsapp/github-action@v2
58+
with:
59+
github-token: ${{ secrets.GITHUB_TOKEN }}
60+
parallel-finished: true

0 commit comments

Comments
 (0)