Skip to content

Commit ca48b22

Browse files
author
Andrew Brookins
committed
Fix yaml for CI #blessed
1 parent 60dc986 commit ca48b22

File tree

1 file changed

+136
-137
lines changed

1 file changed

+136
-137
lines changed

.github/workflows/ci.yml

Lines changed: 136 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- '[0-9].[0-9]+'
1313
- 'update/pre-commit-autoupdate'
1414
schedule:
15-
- cron: '0 6 * * *' # Daily 6AM UTC build
15+
- cron: '0 6 * * *' # Daily 6AM UTC build
1616

1717

1818
jobs:
@@ -22,57 +22,57 @@ jobs:
2222
runs-on: ubuntu-latest
2323
timeout-minutes: 5
2424
steps:
25-
- name: Checkout
26-
uses: actions/checkout@v2.3.5
27-
- name: Setup Python 3.9
28-
uses: actions/setup-python@v2
29-
with:
30-
python-version: 3.9
31-
#----------------------------------------------
32-
# ----- install & configure poetry -----
33-
#----------------------------------------------
34-
- name: Install Poetry
35-
uses: snok/install-poetry@v1
36-
with:
37-
virtualenvs-create: true
38-
virtualenvs-in-project: true
39-
installer-parallel: true
40-
#----------------------------------------------
41-
# load cached venv if cache exists
42-
#----------------------------------------------
43-
- name: Load cached venv
44-
id: cached-poetry-dependencies
45-
uses: actions/cache@v2
46-
with:
47-
path: .venv
48-
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
49-
#----------------------------------------------
50-
# install dependencies if cache does not exist
51-
#----------------------------------------------
52-
- name: Install dependencies
53-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
54-
run: poetry install --no-interaction --no-root
55-
#----------------------------------------------
56-
# install your root project, if required
57-
#----------------------------------------------
58-
- name: Install library
59-
run: poetry install --no-interaction
60-
#----------------------------------------------
61-
# run test suite
62-
#----------------------------------------------
63-
- name: Run linter
64-
run: |
65-
make dist
66-
make lint
25+
- name: Checkout
26+
uses: actions/checkout@v2.3.5
27+
- name: Setup Python 3.9
28+
uses: actions/setup-python@v2
29+
with:
30+
python-version: 3.9
31+
#----------------------------------------------
32+
# ----- install & configure poetry -----
33+
#----------------------------------------------
34+
- name: Install Poetry
35+
uses: snok/install-poetry@v1
36+
with:
37+
virtualenvs-create: true
38+
virtualenvs-in-project: true
39+
installer-parallel: true
40+
#----------------------------------------------
41+
# load cached venv if cache exists
42+
#----------------------------------------------
43+
- name: Load cached venv
44+
id: cached-poetry-dependencies
45+
uses: actions/cache@v2
46+
with:
47+
path: .venv
48+
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
49+
#----------------------------------------------
50+
# install dependencies if cache does not exist
51+
#----------------------------------------------
52+
- name: Install dependencies
53+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
54+
run: poetry install --no-interaction --no-root
55+
#----------------------------------------------
56+
# install your root project, if required
57+
#----------------------------------------------
58+
- name: Install library
59+
run: poetry install --no-interaction
60+
#----------------------------------------------
61+
# run test suite
62+
#----------------------------------------------
63+
- name: Run linter
64+
run: |
65+
make dist
66+
make lint
6767
6868
test-unix:
6969
name: Test Unix
7070
needs: lint
7171
strategy:
7272
matrix:
73-
os: [ubuntu-latest]
74-
pyver: [3.6, 3.7, 3.8, 3.9, pypy3]
75-
redismod: ["preview"] # Removed "edge" because it's broken currently
73+
os: [ ubuntu-latest ]
74+
pyver: [ 3.6, 3.7, 3.8, 3.9, pypy3 ]
75+
redismod: [ "preview" ] # Removed "edge" because it's broken currently
7676
fail-fast: false
7777
services:
7878
redis:
@@ -92,96 +92,95 @@ jobs:
9292
OS: ${{ matrix.os }}
9393
INSTALL_DIR: ${{ github.workspace }}/redis
9494
steps:
95-
- name: Checkout
96-
uses: actions/checkout@v2.3.5
97-
- name: Setup Python ${{ matrix.pyver }}
98-
uses: actions/setup-python@v2
99-
with:
100-
python-version: ${{ matrix.pyver }}
101-
#----------------------------------------------
102-
# ----- install & configure poetry -----
103-
#----------------------------------------------
104-
- name: Install Poetry
105-
uses: snok/install-poetry@v1
106-
with:
107-
virtualenvs-create: true
108-
virtualenvs-in-project: true
109-
installer-parallel: true
110-
#----------------------------------------------
111-
# load cached venv if cache exists
112-
#----------------------------------------------
113-
- name: Load cached venv
114-
id: cached-poetry-dependencies
115-
uses: actions/cache@v2
116-
with:
117-
path: .venv
118-
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
119-
#----------------------------------------------
120-
# install dependencies if cache does not exist
121-
#----------------------------------------------
122-
- name: Install dependencies
123-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
124-
run: poetry install --no-interaction --no-root
125-
#----------------------------------------------
126-
# install your root project, if required
127-
#----------------------------------------------
128-
- name: Install library
129-
run: poetry install --no-interaction
130-
- name: Run unittests (redismod:${{ matrix.redismod }}, ${{ matrix.os }})
131-
run: |
132-
make test
133-
poetry run coverage xml
134-
- name: Upload coverage
135-
uses: codecov/codecov-action@v2.1.0
136-
with:
137-
file: ./coverage.xml
138-
flags: unit
139-
env_vars: OS
140-
fail_ci_if_error: false
95+
- name: Checkout
96+
uses: actions/checkout@v2.3.5
97+
- name: Setup Python ${{ matrix.pyver }}
98+
uses: actions/setup-python@v2
99+
with:
100+
python-version: ${{ matrix.pyver }}
101+
#----------------------------------------------
102+
# ----- install & configure poetry -----
103+
#----------------------------------------------
104+
- name: Install Poetry
105+
uses: snok/install-poetry@v1
106+
with:
107+
virtualenvs-create: true
108+
virtualenvs-in-project: true
109+
installer-parallel: true
110+
#----------------------------------------------
111+
# load cached venv if cache exists
112+
#----------------------------------------------
113+
- name: Load cached venv
114+
id: cached-poetry-dependencies
115+
uses: actions/cache@v2
116+
with:
117+
path: .venv
118+
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
119+
#----------------------------------------------
120+
# install dependencies if cache does not exist
121+
#----------------------------------------------
122+
- name: Install dependencies
123+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
124+
run: poetry install --no-interaction --no-root
125+
#----------------------------------------------
126+
# install your root project, if required
127+
#----------------------------------------------
128+
- name: Install library
129+
run: poetry install --no-interaction
130+
- name: Run unittests (redismod:${{ matrix.redismod }}, ${{ matrix.os }})
131+
run: |
132+
make test
133+
poetry run coverage xml
134+
- name: Upload coverage
135+
uses: codecov/codecov-action@v2.1.0
136+
with:
137+
file: ./coverage.xml
138+
flags: unit
139+
env_vars: OS
140+
fail_ci_if_error: false
141141

142142
deploy:
143-
name: Deploy
144-
runs-on: ubuntu-latest
145-
needs: test-unix
146-
# Run only on pushing a tag
147-
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
148-
steps:
149-
- name: Checkout
150-
uses: actions/checkout@v2.3.5
151-
- name: Setup Python 3.9
152-
uses: actions/setup-python@v2
153-
with:
154-
python-version: 3.9
155-
156-
- name: Install Poetry
157-
uses: snok/install-poetry@v1
158-
with:
159-
virtualenvs-create: true
160-
virtualenvs-in-project: true
161-
installer-parallel: true
162-
#----------------------------------------------
163-
# load cached venv if cache exists
164-
#----------------------------------------------
165-
- name: Load cached venv
166-
id: cached-poetry-dependencies
167-
uses: actions/cache@v2
168-
with:
169-
path: .venv
170-
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
171-
#----------------------------------------------
172-
# install dependencies if cache does not exist
173-
#----------------------------------------------
174-
- name: Install dependencies
175-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
176-
run: poetry install --no-interaction --no-root
177-
#----------------------------------------------
178-
# install your root project, if required
179-
#----------------------------------------------
180-
- name: Install library
181-
run: poetry install --no-interaction
182-
- name: PyPI upload
183-
env:
184-
TWINE_USERNAME: __token__
185-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
186-
run: |
187-
make upload
143+
name: Deploy
144+
runs-on: ubuntu-latest
145+
needs: test-unix
146+
# Run only on pushing a tag
147+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
148+
steps:
149+
- name: Checkout
150+
uses: actions/checkout@v2.3.5
151+
- name: Setup Python 3.9
152+
uses: actions/setup-python@v2
153+
with:
154+
python-version: 3.9
155+
- name: Install Poetry
156+
uses: snok/install-poetry@v1
157+
with:
158+
virtualenvs-create: true
159+
virtualenvs-in-project: true
160+
installer-parallel: true
161+
#----------------------------------------------
162+
# load cached venv if cache exists
163+
#----------------------------------------------
164+
- name: Load cached venv
165+
id: cached-poetry-dependencies
166+
uses: actions/cache@v2
167+
with:
168+
path: .venv
169+
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
170+
#----------------------------------------------
171+
# install dependencies if cache does not exist
172+
#----------------------------------------------
173+
- name: Install dependencies
174+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
175+
run: poetry install --no-interaction --no-root
176+
#----------------------------------------------
177+
# install your root project, if required
178+
#----------------------------------------------
179+
- name: Install library
180+
run: poetry install --no-interaction
181+
- name: PyPI upload
182+
env:
183+
TWINE_USERNAME: __token__
184+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
185+
run: |
186+
make upload

0 commit comments

Comments
 (0)